Skip to content

Instantly share code, notes, and snippets.

Joshua Moody jmoody

Block or report user

Report or block jmoody

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jmoody
jmoody / dot_xamrin_dir.txt
Last active Aug 29, 2015
an example of a ~/.xamarin directory
View dot_xamrin_dir.txt
[stern:~/.xamarin]: moody$ tree
.
├── devices
│   ├── android_phone -> r2d2
│   ├── android_tablet -> marvin
│   ├── earp
│   │   ├── ip
│   │   └── udid
│   ├── ipad -> venus
│   ├── iphone -> neptune
@jmoody
jmoody / Gemfile
Created Feb 8, 2014
Gemfile that demonstrates a way to use bundler + local, non-version controlled files to enforce local branch checks
View Gemfile
# the idea here to rely on .calabash-gem and .briar-gem files
# that are not under version control to set the path and branch.
#
# we want bundler to force local branch checks so calabash and briar
# maintainers are allows aware of what branch they are working from.
#
# non-maintainers can simply use the Gemfile as-is.
#
# maintainers should configure bundler to check that they are working against
# the correct branch.
@jmoody
jmoody / 01_launch_sample.rb
Created Mar 9, 2014
cucumber Before hook for forcing iPhone app emulated on an iPad
View 01_launch_sample.rb
Before do |scenario|
@calabash_launcher = Calabash::Cucumber::Launcher.new
unless @calabash_launcher.calabash_no_launch?
@calabash_launcher.relaunch
@calabash_launcher.calabash_notify(self)
if ios7?
ensure_ipad_emulation_1x
end
end
end
@jmoody
jmoody / touch_and_hold.rb
Created Mar 11, 2014
example of using UIAutomation + calabash to perform a touch and hold gesture
View touch_and_hold.rb
def uia_handle_target_command(cmd, *query_args)
args = query_args.map do |part|
if part.is_a?(String)
"#{escape_uia_string(part)}"
else
"#{escape_uia_string(part.to_edn)}"
end
end
command = %Q[target.#{cmd}(#{args.join(', ')})]
@jmoody
jmoody / env.sh
Created Mar 13, 2014
list of calabash-ios ENV vars
View env.sh
# a raw list created by:
# $ find . -name *.rb -type f -exec grep ENV {} \; -print > ~/tmp/calabash-vars.txt
# and then hand extracting
# * probably some duplicates
# * some of these are deprecated
# * some should be deprecated
# * some should never be set outside of gem/server development
CALABASH_IRBRC
IRBRC
View xcbuild.sh
xcodebuild \
-workspace wetap.xcworkspace \
-scheme wetap \
-configuration AdHoc \
-destination 'platform=iOS Simulator,name=iPhone Retina (4-inch),OS=latest' \
clean test | rbenv exec bundle exec xcpretty -c
codebuild[44797:4403] DVTAssertions: Warning in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-5067/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/SpecificationTypes/BuiltInSpecifications/Compilers/XCGccMakefileDependencies.m:76
Details: Failed to load dependencies output contents from ``/Users/moody/Library/Developer/Xcode/DerivedData/wetap-gijejwfevueujveyphhohjhctvrf/Build/Intermediates/wetap.build/AdHoc-iphonesimulator/wetap.build/Objects-normal/i386/WtMapView.d''. Error: Error Domain=NSCocoaErrorDomain Code=260 "The file “WtMapView.d” couldn’t be opened because there is no such file." UserInfo=0x7faebb761570 {NSFilePath=/Users/moody/Library/Developer/Xcode/DerivedData/wetap-gijejwfevueujveyphhohjhctvrf/Build/Intermediates/wetap.build/AdH
View gist:5ed6c3ea5037dbeb138d
[alias]
co = checkout
st = status
br = branch
[push]
default = current
@jmoody
jmoody / paste.md
Created May 23, 2014
required information for analyzing calabash iOS issues
View paste.md

Please paste the output of the following commands:

# xcode installation location
$ xcode-select --print-path

# xcode version
$ xcodebuild -version

# calabash version
View a.rb
@wip
Scenario: Add a fountain to the Map
WARN: server version is not compatible with gem version
please update your server and gem
gem version: '0.9.169.pre6'
min server version: '0.9.169.pre6'
server version: '0.9.169.pre2'
Given the app has started
Then I should see a button to create new fountains
@jmoody
jmoody / a.rb
Last active Aug 29, 2015
deprecate a ruby constant
View a.rb
def self.const_missing(const_name)
if const_name == :FRAMEWORK_VERSION
_deprecated('0.9.169', 'no replacement', :warn)
return nil
end
raise(NameError, "uninitialized constant Calabash::Cucumber::#{const_name}")
end
You can’t perform that action at this time.