chemistrykit 1.2.0 → 1.2.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.
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format progress
data/README.md CHANGED
@@ -38,3 +38,7 @@ This project conforms to the [neverstopbuilding/craftsmanship](https://github.co
38
38
  ### Run rake task to test code
39
39
 
40
40
  rake build
41
+
42
+ ### Run the local version of the executable:
43
+
44
+ bin/ckit
data/bin/ckit CHANGED
@@ -1,14 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
-
3
2
  require 'chemistrykit'
4
3
 
5
- ckit_result = ChemistryKit::CLI::CKitCLI.start
6
-
7
4
  # Had difficulties getting Thor to return a proper exit status on failure
8
5
  # Will need to revisit
9
-
10
- if ckit_result.is_a? Array
11
- exit 0
12
- else
13
- exit ckit_result
14
- end
6
+ ckit_result = ChemistryKit::CLI::CKitCLI.start
7
+ ckit_result.kind_of?(Integer)? exit(ckit_result): exit(0)
@@ -1,12 +1,12 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "chemistrykit"
3
- s.version = "1.2.0"
3
+ s.version = "1.2.1"
4
4
  s.platform = Gem::Platform::RUBY
5
- s.authors = ["Dave Haeffner"]
6
- s.email = ["dave@arrgyle.com"]
5
+ s.authors = ["Dave Haeffner", "Jason Fox"]
6
+ s.email = ["dave@arrgyle.com", "jason@arrgyle.com"]
7
7
  s.homepage = "https://github.com/arrgyle/chemistrykit"
8
8
  s.summary = "A simple and opinionated web testing framework for Selenium that follows convention over configuration."
9
- s.description = "Fixing a bug with exit status codes not returning properly on failure. And bumping to a new version of selenium-connect to get better logging and access to GhostDriver/PhantomJS."
9
+ s.description = "Fixing the exit codes better, and addressing a bug with logging."
10
10
  s.license = 'MIT'
11
11
 
12
12
  s.files = `git ls-files`.split($/)
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.add_dependency "selenium-webdriver", "~> 2.29.0"
22
22
  s.add_dependency "ci_reporter", "~> 1.8.3"
23
23
  s.add_dependency "rest-client", "~> 1.6.7"
24
- s.add_dependency "selenium-connect", "~> 1.9.0"
24
+ s.add_dependency "selenium-connect", "~> 1.9.3"
25
25
 
26
26
  s.add_development_dependency "rspec", "~> 2.12.0"
27
27
  s.add_development_dependency "aruba", "~> 0.5.1"
@@ -43,6 +43,9 @@ Feature: Brewing a ChemistryKit project
43
43
  """
44
44
  When I run `ckit brew`
45
45
  Then the stdout should contain "1 example, 0 failures"
46
+ And the following files should exist:
47
+ | evidence/SPEC-Bookie.xml |
48
+ | evidence/server.log |
46
49
 
47
50
  Examples:
48
51
  | hostname |
@@ -28,12 +28,11 @@ module ChemistryKit
28
28
  def brew
29
29
  require 'chemistrykit/shared_context'
30
30
  pass_params if options['params']
31
- load_page_objects
32
- set_logs_dir
33
31
  turn_stdout_stderr_on_off
32
+ set_logs_dir
33
+ load_page_objects
34
34
  setup_tags
35
35
  rspec_config
36
- symlink_latest_report
37
36
  run_rspec
38
37
  end
39
38
 
@@ -49,16 +48,12 @@ module ChemistryKit
49
48
  Dir["#{Dir.getwd}/formulas/*.rb"].each {|file| require file }
50
49
  end
51
50
 
52
- def log_timestamp
53
- @log_timestamp = Time.now.strftime("%Y-%m-%d-%H-%M-%S")
54
- end
55
-
56
51
  def set_logs_dir
57
- ENV['CI_REPORTS'] = File.join(Dir.getwd, 'evidence', log_timestamp)
52
+ ENV['CI_REPORTS'] = File.join(Dir.getwd, 'evidence')
58
53
  end
59
54
 
60
55
  def turn_stdout_stderr_on_off
61
- ENV['CI_CAPTURE'] = 'on' #CHEMISTRY_CONFIG['chemistrykit']['capture_output'] ? 'on' : 'off'
56
+ ENV['CI_CAPTURE'] = 'on'
62
57
  end
63
58
 
64
59
  def setup_tags
@@ -78,6 +73,7 @@ module ChemistryKit
78
73
 
79
74
  def rspec_config #Some of these bits work and others don't
80
75
  RSpec.configure do |c|
76
+ c.treat_symbols_as_metadata_keys_with_true_values = true
81
77
  c.filter_run @tags[:filter] unless @tags[:filter].nil?
82
78
  c.filter_run_excluding @tags[:exclusion_filter] unless @tags[:exclusion_filter].nil?
83
79
  c.include ChemistryKit::SharedContext
@@ -87,20 +83,6 @@ module ChemistryKit
87
83
  end
88
84
  end
89
85
 
90
- def symlink_latest_report
91
- case # Depending on platform, symlinks are done differently
92
- when RUBY_PLATFORM.downcase.include?("mswin")
93
- require 'win32/dir'
94
- if Dir.junction?(File.join(Dir.getwd, 'evidence', 'latest'))
95
- File.delete(File.join(Dir.getwd, 'evidence', 'latest'))
96
- end
97
- Dir.create_junction(File.join(Dir.getwd, 'evidence', 'latest'), File.join(Dir.getwd, 'evidence', @log_timestamp))
98
- else
99
- # This will work on any unix like platform
100
- FileUtils.ln_sf(File.join(Dir.getwd, 'evidence', @log_timestamp), File.join(Dir.getwd, 'evidence', 'latest'))
101
- end
102
- end
103
-
104
86
  def run_rspec
105
87
  RSpec::Core::Runner.run(Dir.glob(File.join(Dir.getwd)))
106
88
  end
File without changes
@@ -0,0 +1,17 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # Require this file using `require "spec_helper"` to ensure that it is only
4
+ # loaded once.
5
+ #
6
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
7
+ RSpec.configure do |config|
8
+ config.treat_symbols_as_metadata_keys_with_true_values = true
9
+ config.run_all_when_everything_filtered = true
10
+ config.filter_run :focus
11
+
12
+ # Run specs in random order to surface order dependencies. If you find an
13
+ # order dependency and want to debug it, you can fix the order by providing
14
+ # the seed, which is printed after each run.
15
+ # --seed 1234
16
+ config.order = 'random'
17
+ end
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chemistrykit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Dave Haeffner
9
+ - Jason Fox
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2013-06-19 00:00:00.000000000 Z
13
+ date: 2013-06-22 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: thor
@@ -98,7 +99,7 @@ dependencies:
98
99
  requirements:
99
100
  - - ~>
100
101
  - !ruby/object:Gem::Version
101
- version: 1.9.0
102
+ version: 1.9.3
102
103
  type: :runtime
103
104
  prerelease: false
104
105
  version_requirements: !ruby/object:Gem::Requirement
@@ -106,7 +107,7 @@ dependencies:
106
107
  requirements:
107
108
  - - ~>
108
109
  - !ruby/object:Gem::Version
109
- version: 1.9.0
110
+ version: 1.9.3
110
111
  - !ruby/object:Gem::Dependency
111
112
  name: rspec
112
113
  requirement: !ruby/object:Gem::Requirement
@@ -171,11 +172,10 @@ dependencies:
171
172
  - - ~>
172
173
  - !ruby/object:Gem::Version
173
174
  version: 10.0.3
174
- description: Fixing a bug with exit status codes not returning properly on failure.
175
- And bumping to a new version of selenium-connect to get better logging and access
176
- to GhostDriver/PhantomJS.
175
+ description: Fixing the exit codes better, and addressing a bug with logging.
177
176
  email:
178
177
  - dave@arrgyle.com
178
+ - jason@arrgyle.com
179
179
  executables:
180
180
  - ckit
181
181
  extensions:
@@ -183,6 +183,7 @@ extensions:
183
183
  extra_rdoc_files: []
184
184
  files:
185
185
  - .gitignore
186
+ - .rspec
186
187
  - CHANGELOG.md
187
188
  - CONTRIBUTORS.md
188
189
  - Gemfile
@@ -214,6 +215,8 @@ files:
214
215
  - lib/templates/chemistrykit/formulas/.gitkeep
215
216
  - lib/templates/formula.tt
216
217
  - readme2.md
218
+ - spec/chemistrykit/cli_spec.rb
219
+ - spec/spec_helper.rb
217
220
  homepage: https://github.com/arrgyle/chemistrykit
218
221
  licenses:
219
222
  - MIT
@@ -246,3 +249,5 @@ test_files:
246
249
  - features/new.feature
247
250
  - features/step_definitions/steps.rb
248
251
  - features/support/env.rb
252
+ - spec/chemistrykit/cli_spec.rb
253
+ - spec/spec_helper.rb