gyst 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog.md +6 -1
- data/Gemfile +1 -5
- data/README.md +17 -9
- data/Rakefile +20 -2
- data/bin/grease_your_suite +15 -0
- data/bin/rakee +1 -1
- data/cucumber.yml +25 -0
- data/features/command_line/grease_your_suite.feature +20 -4
- data/features/command_line/rake_gyst.feature +19 -0
- data/features/command_line/rakee.feature +1 -1
- data/features/command_line/raket.feature +1 -1
- data/features/step_definitions/output_steps.rb +6 -0
- data/gyst.gemspec +2 -2
- data/lib/gyst/version.rb +1 -1
- metadata +24 -10
- data/bin/grease_your_suite.sh +0 -13
data/Changelog.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
|
-
## 0.0.
|
1
|
+
## 0.0.3 (June 29, 2011) - Easy Install
|
2
2
|
|
3
3
|
Features:
|
4
|
+
- gem install gyst (no need for --no-wrappers arg)
|
5
|
+
|
4
6
|
|
7
|
+
## 0.0.2 (May 27, 2011) - Happy Birthday Mom.
|
8
|
+
|
9
|
+
Features:
|
5
10
|
- scripts: rakee, raket
|
6
11
|
- patches: gyst/factory_girl
|
data/Gemfile
CHANGED
@@ -4,11 +4,7 @@ source "http://rubygems.org"
|
|
4
4
|
gemspec
|
5
5
|
|
6
6
|
group :test do
|
7
|
+
gem 'cucumber_spinner'
|
7
8
|
gem 'factory_girl' # not in gemspec since use of factory_girl patch is optional
|
8
9
|
end
|
9
10
|
|
10
|
-
group :blog do
|
11
|
-
gem 'jekyll', '0.10.0' # version for gh_pages
|
12
|
-
gem 'liquid', '2.0.0' # version for gh_pages (http://support.github.com/discussions/site/3216-github-pages-liquid-template-tags-not-being-parsed)
|
13
|
-
gem 'rdiscount' # I haven't found the gh_pages specific version yet.
|
14
|
-
end
|
data/README.md
CHANGED
@@ -12,12 +12,17 @@ Faster tests? Good.
|
|
12
12
|
|
13
13
|
Install
|
14
14
|
--------
|
15
|
-
|
16
|
-
functionality.
|
17
|
-
**NOTE:** in order to use the bash scripts, you must use the `--no-wrapper`
|
18
|
-
argument.
|
19
|
-
gem install pkg/gyst-0.0.1.gem --no-wrappers
|
15
|
+
First, [some songs to test by][music] courtesy of [![portal2](http://www.thinkwithportals.com/images/favicon.ico)][music]
|
20
16
|
|
17
|
+
**NOTE:** in order to use the bash scripts, you must use the `--no-wrappers` argument.
|
18
|
+
|
19
|
+
From rubygems:
|
20
|
+
gem install gyst --no-wrappers
|
21
|
+
Locally:
|
22
|
+
gem install pkg/gyst-0.?.?.gem --no-wrappers
|
23
|
+
|
24
|
+
Why do you have to add `-no-wrappers`? Because the scripts are bash scripts, not ruby scripts.
|
25
|
+
We are stuck with this workaround until someone finds a better answer for this issue. This is the only reference I have found: <http://help.rubygems.org/discussions/suggestions/12-per-executable-wrappers>
|
21
26
|
|
22
27
|
Dependencies
|
23
28
|
------------
|
@@ -79,14 +84,14 @@ Usage:
|
|
79
84
|
### Libraries
|
80
85
|
---
|
81
86
|
<strong>As of 2011-05, "`require 'gyst'`" is a noop.</strong>
|
82
|
-
You must require the pieces
|
83
|
-
Patch factory_girl to use :build, break
|
84
|
-
Add 'db_null', break
|
87
|
+
You must require the specific pieces that you want. We'll turn this on once more pieces are available, otherwise we will probably break your tests with each release.
|
88
|
+
Patch factory_girl to use :build, break some tests.
|
89
|
+
Add 'db_null', break some tests.
|
85
90
|
Simply by using "require 'gyst'"? Let's wait.
|
86
91
|
|
87
92
|
---
|
88
93
|
|
89
|
-
We are using "selective requires" for the libraries and scripts. Want everything
|
94
|
+
We are using "selective requires" for the libraries and scripts. Want everything? Simply:
|
90
95
|
require 'gyst' # (TODO) enables all the libraries and applies all the patches
|
91
96
|
|
92
97
|
You can also just `require` the pieces you want.
|
@@ -122,6 +127,8 @@ Feel free to add sugggestions and bugs to our [issues on github](https://github.
|
|
122
127
|
|
123
128
|
* Fork the project.
|
124
129
|
* `bundle install`. Run all tests with `rakee`
|
130
|
+
* **Testing Note:** `rakee` skips @gemset features, due to (bundler?) errors.
|
131
|
+
`cucumber` runs ALL features.
|
125
132
|
* Make your feature addition or bug fix.
|
126
133
|
* Add tests for it. This is important so I don't break it in a
|
127
134
|
future version unintentionally. Note: the existing tests may fail
|
@@ -156,6 +163,7 @@ TODO
|
|
156
163
|
|
157
164
|
|
158
165
|
[gys_showoff]: http://grease-your-suite.heroku.com/ "Grease Your Suites"
|
166
|
+
[music]: http://www.thinkwithportals.com/music.php "Songs To Test By - Portal2"
|
159
167
|
|
160
168
|
____
|
161
169
|
Copyright (c) 2011 Matthew Scilipoti, released under the MIT license
|
data/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'bundler'
|
2
2
|
Bundler::GemHelper.install_tasks
|
3
|
-
|
3
|
+
require 'ap'
|
4
4
|
|
5
5
|
require 'rake/testtask'
|
6
6
|
|
@@ -13,7 +13,7 @@ require 'cucumber'
|
|
13
13
|
require 'cucumber/rake/task'
|
14
14
|
|
15
15
|
Cucumber::Rake::Task.new(:features) do |t|
|
16
|
-
t.cucumber_opts = "features --format pretty"
|
16
|
+
t.cucumber_opts = "features --format pretty --tags ~@gemset"
|
17
17
|
end
|
18
18
|
|
19
19
|
task :default => [:test, :features]
|
@@ -28,3 +28,21 @@ task :fail do
|
|
28
28
|
fail "EXPECTED FAILURE"
|
29
29
|
end
|
30
30
|
|
31
|
+
namespace :gyst do
|
32
|
+
desc 'Display info related to gyst (env vars, etc)'
|
33
|
+
task :info do
|
34
|
+
env_vars = %w{
|
35
|
+
RUBY_GC_MALLOC_LIMIT
|
36
|
+
RUBY_HEAP_FREE_MIN
|
37
|
+
RUBY_HEAP_MIN_SLOTS
|
38
|
+
RUBY_HEAP_SLOTS_INCREMENT
|
39
|
+
RUBY_HEAP_SLOTS_GROWTH_FACTOR
|
40
|
+
}
|
41
|
+
env_var_values = env_vars.inject({}) do |result, var_name|
|
42
|
+
result[var_name] = ENV[var_name]
|
43
|
+
result
|
44
|
+
end
|
45
|
+
|
46
|
+
ap env_var_values
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# Note: to generate this without the ruby gems wrapper,
|
4
|
+
# we used the --no-wrapper arg
|
5
|
+
puts "INFO: Configuring REE (re: grease_your_suite)"
|
6
|
+
$stdout.flush
|
7
|
+
|
8
|
+
ENV['RUBY_GC_MALLOC_LIMIT'] = '1000000000'
|
9
|
+
ENV['RUBY_HEAP_FREE_MIN'] = '500000111'
|
10
|
+
ENV['RUBY_HEAP_MIN_SLOTS'] = '1000000'
|
11
|
+
ENV['RUBY_HEAP_SLOTS_GROWTH_FACTOR'] = '1'
|
12
|
+
ENV['RUBY_HEAP_SLOTS_INCREMENT'] = '1000000'
|
13
|
+
|
14
|
+
exec "time", '-p', *ARGV
|
15
|
+
|
data/bin/rakee
CHANGED
data/cucumber.yml
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
<%
|
2
|
+
require 'cucumber_spinner'
|
3
|
+
#to use cucumber_spinner, set format to CucumberSpinner::ProgressBarFormatter
|
4
|
+
std_format = ENV['CUCUMBER_FORMAT'] || CucumberSpinner::ProgressBarFormatter
|
5
|
+
std_opts = "--format #{std_format} --strict --require features"
|
6
|
+
std_tags = "--tags ~@wip --tags ~@pending --tags ~@javascript"
|
7
|
+
|
8
|
+
rerun_file = 'tmp/cucumber_rerun.txt'
|
9
|
+
rerun_opts = "--strict --require=features --format=rerun --out=#{rerun_file} #{std_tags} "
|
10
|
+
files_to_rerun = File.file?(rerun_file) ? IO.read(rerun_file) : ""
|
11
|
+
if files_to_rerun.to_s.strip.empty?
|
12
|
+
rerun_opts << " --format=#{std_format} features"
|
13
|
+
else
|
14
|
+
rerun_opts << " --format=#{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{files_to_rerun}"
|
15
|
+
end
|
16
|
+
|
17
|
+
%>
|
18
|
+
default: <%= std_opts %> <%= std_tags %>
|
19
|
+
|
20
|
+
all: <%= std_opts %>
|
21
|
+
js: <%= std_opts %> --tags @javascript
|
22
|
+
logged: --format RailsLoggerFormatter
|
23
|
+
rerun: <%= rerun_opts %>
|
24
|
+
wip: --tags @wip:3 --wip
|
25
|
+
|
@@ -5,13 +5,29 @@ Feature: the grease_your_suite script sets configuration options for REE
|
|
5
5
|
to configure GC appropriately for testing
|
6
6
|
|
7
7
|
|
8
|
-
Scenario:
|
9
|
-
When I run
|
8
|
+
Scenario: running with no args
|
9
|
+
When I successfully run `../../bin/grease_your_suite`
|
10
10
|
# output includes message and output from `time`
|
11
|
-
Then
|
11
|
+
Then the output should contain:
|
12
12
|
"""
|
13
13
|
INFO: Configuring REE (re: grease_your_suite)
|
14
|
+
"""
|
14
15
|
|
15
|
-
|
16
|
+
Scenario: the script sets Environment Variables
|
17
|
+
When I run `../../bin/grease_your_suite rake gyst:info`
|
18
|
+
Then the output should contain:
|
19
|
+
"""
|
20
|
+
{
|
21
|
+
"RUBY_GC_MALLOC_LIMIT" => "1000000000",
|
22
|
+
"RUBY_HEAP_FREE_MIN" => "500000111",
|
23
|
+
"RUBY_HEAP_MIN_SLOTS" => "1000000",
|
24
|
+
"RUBY_HEAP_SLOTS_INCREMENT" => "1000000",
|
25
|
+
"RUBY_HEAP_SLOTS_GROWTH_FACTOR" => "1"
|
26
|
+
}
|
27
|
+
"""
|
28
|
+
Then the output should contain:
|
29
|
+
"""
|
30
|
+
INFO: Configuring REE (re: grease_your_suite)
|
16
31
|
"""
|
32
|
+
And the output should report timing
|
17
33
|
|
@@ -0,0 +1,19 @@
|
|
1
|
+
Feature: the rake tasks for gyst
|
2
|
+
|
3
|
+
In order make common tasks easy
|
4
|
+
A developer
|
5
|
+
Wants some rake tasks
|
6
|
+
|
7
|
+
Scenario: gyst:info
|
8
|
+
When I run `rake gyst:info`
|
9
|
+
Then it should pass with:
|
10
|
+
"""
|
11
|
+
{
|
12
|
+
"RUBY_GC_MALLOC_LIMIT" => nil,
|
13
|
+
"RUBY_HEAP_FREE_MIN" => nil,
|
14
|
+
"RUBY_HEAP_MIN_SLOTS" => nil,
|
15
|
+
"RUBY_HEAP_SLOTS_INCREMENT" => nil,
|
16
|
+
"RUBY_HEAP_SLOTS_GROWTH_FACTOR" => nil
|
17
|
+
}
|
18
|
+
"""
|
19
|
+
|
data/gyst.gemspec
CHANGED
@@ -10,8 +10,7 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.email = ["matt@scilipoti.name"]
|
11
11
|
s.homepage = ""
|
12
12
|
s.summary = %q{A suite of helpers to aid in speeding up your tests.}
|
13
|
-
s.description = %q{A suite of helpers to aid in speeding up your tests; including scripts, existing libraries, and patches.
|
14
|
-
}
|
13
|
+
s.description = %q{A suite of helpers to aid in speeding up your tests; including scripts, existing libraries, and patches.}
|
15
14
|
|
16
15
|
s.rubyforge_project = "gyst"
|
17
16
|
|
@@ -21,6 +20,7 @@ Gem::Specification.new do |s|
|
|
21
20
|
s.require_paths = ["lib"]
|
22
21
|
|
23
22
|
s.add_development_dependency('aruba')
|
23
|
+
s.add_development_dependency('awesome_print')
|
24
24
|
s.add_development_dependency('minitest')
|
25
25
|
s.add_development_dependency('rake')
|
26
26
|
end
|
data/lib/gyst/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: gyst
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Matt Scilipoti
|
@@ -10,8 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
14
|
-
default_executable:
|
13
|
+
date: 2011-06-29 00:00:00 Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
16
|
name: aruba
|
@@ -25,7 +24,7 @@ dependencies:
|
|
25
24
|
type: :development
|
26
25
|
version_requirements: *id001
|
27
26
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
27
|
+
name: awesome_print
|
29
28
|
prerelease: false
|
30
29
|
requirement: &id002 !ruby/object:Gem::Requirement
|
31
30
|
none: false
|
@@ -36,7 +35,7 @@ dependencies:
|
|
36
35
|
type: :development
|
37
36
|
version_requirements: *id002
|
38
37
|
- !ruby/object:Gem::Dependency
|
39
|
-
name:
|
38
|
+
name: minitest
|
40
39
|
prerelease: false
|
41
40
|
requirement: &id003 !ruby/object:Gem::Requirement
|
42
41
|
none: false
|
@@ -46,11 +45,22 @@ dependencies:
|
|
46
45
|
version: "0"
|
47
46
|
type: :development
|
48
47
|
version_requirements: *id003
|
49
|
-
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: rake
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: "0"
|
57
|
+
type: :development
|
58
|
+
version_requirements: *id004
|
59
|
+
description: A suite of helpers to aid in speeding up your tests; including scripts, existing libraries, and patches.
|
50
60
|
email:
|
51
61
|
- matt@scilipoti.name
|
52
62
|
executables:
|
53
|
-
- grease_your_suite
|
63
|
+
- grease_your_suite
|
54
64
|
- rakee
|
55
65
|
- raket
|
56
66
|
extensions: []
|
@@ -64,13 +74,16 @@ files:
|
|
64
74
|
- MIT-LICENSE
|
65
75
|
- README.md
|
66
76
|
- Rakefile
|
67
|
-
- bin/grease_your_suite
|
77
|
+
- bin/grease_your_suite
|
68
78
|
- bin/rakee
|
69
79
|
- bin/raket
|
80
|
+
- cucumber.yml
|
70
81
|
- features/command_line/grease_your_suite.feature
|
82
|
+
- features/command_line/rake_gyst.feature
|
71
83
|
- features/command_line/rakee.feature
|
72
84
|
- features/command_line/raket.feature
|
73
85
|
- features/patches/factory_girl.feature
|
86
|
+
- features/step_definitions/output_steps.rb
|
74
87
|
- features/step_definitions/rvm_steps.rb
|
75
88
|
- features/support/env.rb
|
76
89
|
- gyst.gemspec
|
@@ -78,7 +91,6 @@ files:
|
|
78
91
|
- lib/gyst/factory_girl.rb
|
79
92
|
- lib/gyst/version.rb
|
80
93
|
- test/factory_girl_spec.rb
|
81
|
-
has_rdoc: true
|
82
94
|
homepage: ""
|
83
95
|
licenses: []
|
84
96
|
|
@@ -102,15 +114,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
114
|
requirements: []
|
103
115
|
|
104
116
|
rubyforge_project: gyst
|
105
|
-
rubygems_version: 1.
|
117
|
+
rubygems_version: 1.8.5
|
106
118
|
signing_key:
|
107
119
|
specification_version: 3
|
108
120
|
summary: A suite of helpers to aid in speeding up your tests.
|
109
121
|
test_files:
|
110
122
|
- features/command_line/grease_your_suite.feature
|
123
|
+
- features/command_line/rake_gyst.feature
|
111
124
|
- features/command_line/rakee.feature
|
112
125
|
- features/command_line/raket.feature
|
113
126
|
- features/patches/factory_girl.feature
|
127
|
+
- features/step_definitions/output_steps.rb
|
114
128
|
- features/step_definitions/rvm_steps.rb
|
115
129
|
- features/support/env.rb
|
116
130
|
- test/factory_girl_spec.rb
|
data/bin/grease_your_suite.sh
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
#!/bin/sh
|
2
|
-
|
3
|
-
# Note: to generate this without the ruby gems wrapper,
|
4
|
-
# we used the --no-wrapper arg
|
5
|
-
echo "INFO: Configuring REE (re: grease_your_suite)"
|
6
|
-
export RUBY_HEAP_MIN_SLOTS=1000000
|
7
|
-
export RUBY_HEAP_SLOTS_INCREMENT=1000000
|
8
|
-
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
|
9
|
-
export RUBY_GC_MALLOC_LIMIT=1000000000
|
10
|
-
export RUBY_HEAP_FREE_MIN=500000111
|
11
|
-
|
12
|
-
time $@
|
13
|
-
|