ilesspainfulclient-cucumber 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. data/.hgignore +1 -0
  2. data/.idea/.name +1 -0
  3. data/.idea/.rakeTasks +7 -0
  4. data/.idea/dictionaries/krukow.xml +9 -0
  5. data/.idea/encodings.xml +5 -0
  6. data/.idea/iLessPainfulClient.iml +17 -0
  7. data/.idea/jsLibraryMappings.xml +7 -0
  8. data/.idea/misc.xml +8 -0
  9. data/.idea/modules.xml +9 -0
  10. data/.idea/vcs.xml +7 -0
  11. data/.idea/workspace.xml +626 -0
  12. data/Gemfile +4 -0
  13. data/Gemfile.lock +39 -0
  14. data/LICENSE +13 -0
  15. data/NOTICE +6 -0
  16. data/Rakefile +2 -0
  17. data/bin/ilesspainful-skeleton +19 -0
  18. data/features-skeleton/my_first.feature +8 -0
  19. data/features-skeleton/step_definitions/launch_steps.rb +0 -0
  20. data/features-skeleton/support/env.rb +1 -0
  21. data/ilesspainfulclient.gemspec +24 -0
  22. data/lib/ilesspainfulclient-cucumber/color_helper.rb +13 -0
  23. data/lib/ilesspainfulclient-cucumber/cucumber.rb +9 -0
  24. data/lib/ilesspainfulclient-cucumber/lesspainful_steps.rb +569 -0
  25. data/lib/ilesspainfulclient-cucumber/operations.rb +254 -0
  26. data/lib/ilesspainfulclient-cucumber/resources/pinch_in_ipad.base64 +188 -0
  27. data/lib/ilesspainfulclient-cucumber/resources/pinch_in_iphone.base64 +234 -0
  28. data/lib/ilesspainfulclient-cucumber/resources/rotate_home_down_to_left_ipad.base64 +3 -0
  29. data/lib/ilesspainfulclient-cucumber/resources/rotate_home_down_to_left_iphone.base64 +2 -0
  30. data/lib/ilesspainfulclient-cucumber/resources/rotate_home_down_to_right_ipad.base64 +5 -0
  31. data/lib/ilesspainfulclient-cucumber/resources/rotate_home_down_to_right_iphone.base64 +2 -0
  32. data/lib/ilesspainfulclient-cucumber/resources/rotate_home_down_to_up_ipad.base64 +3 -0
  33. data/lib/ilesspainfulclient-cucumber/resources/rotate_home_left_to_down_ipad.base64 +3 -0
  34. data/lib/ilesspainfulclient-cucumber/resources/rotate_home_left_to_down_iphone.base64 +2 -0
  35. data/lib/ilesspainfulclient-cucumber/resources/rotate_home_right_to_down_ipad.base64 +3 -0
  36. data/lib/ilesspainfulclient-cucumber/resources/rotate_home_right_to_down_iphone.base64 +2 -0
  37. data/lib/ilesspainfulclient-cucumber/resources/swipe_left_hard_iphone.base64 +15 -0
  38. data/lib/ilesspainfulclient-cucumber/resources/swipe_left_iphone.base64 +18 -0
  39. data/lib/ilesspainfulclient-cucumber/resources/swipe_right_hard_iphone.base64 +17 -0
  40. data/lib/ilesspainfulclient-cucumber/resources/swipe_right_iphone.base64 +13 -0
  41. data/lib/ilesspainfulclient-cucumber/version.rb +5 -0
  42. data/lib/ilesspainfulclient-cucumber.rb +0 -0
  43. metadata +132 -0
data/Gemfile.lock ADDED
@@ -0,0 +1,39 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ ilesspainfulclient-cucumber (0.0.1)
5
+ cucumber
6
+ json
7
+ net-http-persistent
8
+ rspec (>= 2.0)
9
+
10
+ GEM
11
+ remote: http://rubygems.org/
12
+ specs:
13
+ builder (3.0.0)
14
+ cucumber (1.0.4)
15
+ builder (>= 2.1.2)
16
+ diff-lcs (>= 1.1.2)
17
+ gherkin (~> 2.4.18)
18
+ json (>= 1.4.6)
19
+ term-ansicolor (>= 1.0.6)
20
+ diff-lcs (1.1.3)
21
+ gherkin (2.4.18)
22
+ json (>= 1.4.6)
23
+ json (1.6.0)
24
+ net-http-persistent (2.0)
25
+ rspec (2.6.0)
26
+ rspec-core (~> 2.6.0)
27
+ rspec-expectations (~> 2.6.0)
28
+ rspec-mocks (~> 2.6.0)
29
+ rspec-core (2.6.4)
30
+ rspec-expectations (2.6.0)
31
+ diff-lcs (~> 1.1.2)
32
+ rspec-mocks (2.6.0)
33
+ term-ansicolor (1.0.6)
34
+
35
+ PLATFORMS
36
+ ruby
37
+
38
+ DEPENDENCIES
39
+ ilesspainfulclient-cucumber!
data/LICENSE ADDED
@@ -0,0 +1,13 @@
1
+ Copyright 2011 Karl Krukow <karl.krukow@gmail.com>
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
data/NOTICE ADDED
@@ -0,0 +1,6 @@
1
+ This gem is licensed under the Apache 2 license.
2
+ http://www.apache.org/licenses/LICENSE-2.0
3
+
4
+ This is a modified version of Pete Hodgeson's frank-cucumber
5
+ modified by Karl Krukow <karl.krukow@gmail.com> to work with
6
+ iLessPainful Server (http://www.lesspainful.com).
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'fileutils'
4
+
5
+ features_dir = File.join( FileUtils.pwd, "features" )
6
+
7
+ if File.exists?( features_dir )
8
+ puts "A features directory already exists. I won't overwrite it. Giving up."
9
+ exit 1
10
+ else
11
+ puts "I'm about to create a subdirectory called features which will contain all your Cucumber tests. Please hit return to confirm that's what you want."
12
+ exit 2 unless STDIN.gets.chomp == ''
13
+ end
14
+
15
+ source_dir = File.join( File.dirname(__FILE__), '..', 'features-skeleton' )
16
+
17
+ FileUtils.cp_r( source_dir, features_dir )
18
+
19
+ puts "features subdirectory created. Try executing 'cucumber' from the current directory to see how you new cucumber setup runs."
@@ -0,0 +1,8 @@
1
+ Feature:
2
+ As an iOS developer
3
+ I want to have a sample feature file
4
+ So I can begin testing quickly
5
+
6
+ Scenario: Example steps
7
+ Given the app is running
8
+ Then take picture
@@ -0,0 +1 @@
1
+ require 'ilesspainfulclient/cucumber'
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "ilesspainfulclient-cucumber/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "ilesspainfulclient-cucumber"
7
+ s.version = ILessPainfulClient::Cucumber::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Karl Krukow"]
10
+ s.email = ["karl.krukow@gmail.com"]
11
+ s.homepage = "http://rubygems.org/gems/ilesspainfulclient-cucumber"
12
+ s.summary = %q{Use cucumber to test native iOS apps running iLessPainful Server}
13
+ s.description = %q{Use cucumber to test native iOS apps running iLessPainful Server}
14
+
15
+ s.files = `hg manifest`.split("\n")
16
+ s.test_files = []
17
+ s.executables = `hg manifest | grep bin/`.split("\n").map{ |f| File.basename(f) }
18
+ s.require_paths = ["lib"]
19
+
20
+ s.add_dependency( "cucumber" )
21
+ s.add_dependency( "rspec", [">=2.0"] )
22
+ s.add_dependency( "json" )
23
+ s.add_dependency( "net-http-persistent" )
24
+ end
@@ -0,0 +1,13 @@
1
+ module ILessPainfulClient module Cucumber
2
+
3
+ module ColorHelper
4
+ def colorize(text, color_code)
5
+ "\e[#{color_code}m#{text}\e[0m"
6
+ end
7
+
8
+ def red(text); colorize(text, 31); end
9
+ def green(text); colorize(text, 32); end
10
+ def blue(text); colorize(text, 34); end
11
+ end
12
+
13
+ end end
@@ -0,0 +1,9 @@
1
+ require 'ilesspainfulclient-cucumber/color_helper'
2
+ require 'ilesspainfulclient-cucumber/operations'
3
+
4
+ World(ILessPainfulClient::Cucumber::ColorHelper)
5
+ World(ILessPainfulClient::Cucumber::Operations)
6
+
7
+ AfterConfiguration do
8
+ require 'ilesspainfulclient-cucumber/lesspainful_steps'
9
+ end