copy_tuner_client 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/Appraisals CHANGED
@@ -1,13 +1,13 @@
1
1
  appraise '2.3' do
2
- gem 'rails', '2.3.14'
2
+ gem 'rails', '2.3.16'
3
3
  end
4
4
 
5
5
  appraise '3.0' do
6
- gem 'rails', '3.0.3'
6
+ gem 'rails', '3.0.20'
7
7
  end
8
8
 
9
9
  appraise '3.1' do
10
- gem 'rails', '3.1.0'
10
+ gem 'rails', '3.1.10'
11
11
  gem 'jquery-rails'
12
12
  gem 'uglifier'
13
13
  gem 'sass-rails'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- copy_tuner_client (0.0.1)
4
+ copy_tuner_client (0.0.2)
5
5
  i18n (>= 0.5.0)
6
6
  json
7
7
 
@@ -38,6 +38,7 @@ GEM
38
38
  activesupport (3.1.0)
39
39
  multi_json (~> 1.0)
40
40
  addressable (2.2.6)
41
+ ansi (1.4.3)
41
42
  appraisal (0.4.0)
42
43
  bundler
43
44
  rake
@@ -102,7 +103,7 @@ GEM
102
103
  rake (>= 0.8.7)
103
104
  rdoc (~> 3.4)
104
105
  thor (~> 0.14.6)
105
- rake (0.9.2)
106
+ rake (10.0.3)
106
107
  rdoc (3.9.4)
107
108
  rspec (2.6.0)
108
109
  rspec-core (~> 2.6.0)
@@ -134,6 +135,8 @@ GEM
134
135
  treetop (1.4.10)
135
136
  polyglot
136
137
  polyglot (>= 0.3.1)
138
+ turn (0.9.6)
139
+ ansi
137
140
  tzinfo (0.3.29)
138
141
  webmock (1.7.6)
139
142
  addressable (~> 2.2, > 2.2.5)
@@ -151,11 +154,12 @@ DEPENDENCIES
151
154
  cucumber (~> 0.10.0)
152
155
  i18n
153
156
  rails (~> 3.1.0)
154
- rake (= 0.9.2)
157
+ rake
155
158
  rspec (~> 2.3)
156
159
  sham_rack
157
160
  sinatra
158
161
  sqlite3-ruby
159
162
  thin
163
+ turn
160
164
  webmock
161
165
  yard
data/README.md CHANGED
@@ -2,3 +2,11 @@ CopyTuner Client
2
2
  =================
3
3
 
4
4
  [TODO] Write After
5
+
6
+
7
+ ## Spec
8
+
9
+ ### Appraisal for Multi Version Rails spec
10
+
11
+ rake appraisal:install
12
+ rake appraisal
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
11
11
  s.add_development_dependency 'cucumber', '~> 0.10.0'
12
12
  s.add_development_dependency 'i18n'
13
13
  s.add_development_dependency 'rails', '~> 3.1.0'
14
- s.add_development_dependency 'rake', '0.9.2'
14
+ s.add_development_dependency 'rake'
15
15
  s.add_development_dependency 'rspec', '~> 2.3'
16
16
  s.add_development_dependency 'sham_rack'
17
17
  s.add_development_dependency 'sinatra'
@@ -19,8 +19,9 @@ Gem::Specification.new do |s|
19
19
  s.add_development_dependency 'thin'
20
20
  s.add_development_dependency 'webmock'
21
21
  s.add_development_dependency 'yard'
22
- s.authors = ['thoughtbot']
23
- s.email = 'support@thoughtbot.com'
22
+ s.add_development_dependency 'turn'
23
+ s.authors = ['SonicGarden']
24
+ s.email = 'info@sonicgarden.jp'
24
25
  s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
25
26
  s.files = `git ls-files`.split("\n")
26
27
  s.homepage = 'https://github.com/SonicGarden/copy-tuner-ruby-client'
@@ -34,6 +34,7 @@ When /^I configure the copy_tuner client with api key "([^"]*)"$/ do |api_key|
34
34
  config.polling_delay = 1
35
35
  config.host = 'localhost'
36
36
  config.secure = false
37
+ config.sync_interval = 0
37
38
  config.port = #{FakeCopyTunerApp.port}
38
39
  end
39
40
  RUBY
@@ -131,6 +132,10 @@ Then /^the response should contain "([^"]+)"$/ do |text|
131
132
  @last_response.body.should include(text)
132
133
  end
133
134
 
135
+ When /^show me the page$/ do
136
+ @last_response.body.should == nil
137
+ end
138
+
134
139
  When /^I route the "([^"]+)" resource$/ do |resource|
135
140
  if Rails::VERSION::MAJOR == 3
136
141
  draw = "Testapp::Application.routes.draw do\n"
data/gemfiles/2.3.gemfile CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "rails", "2.3.14"
5
+ gem "rails", "2.3.16"
6
6
 
7
7
  gemspec :path=>"../"
@@ -1,88 +1,92 @@
1
1
  PATH
2
2
  remote: /Users/mat_aki/gem/copy-tuner-ruby-client
3
3
  specs:
4
- copy_tuner_client (0.0.1)
4
+ copy_tuner_client (0.0.2)
5
5
  i18n (>= 0.5.0)
6
6
  json
7
7
 
8
8
  GEM
9
9
  remote: http://rubygems.org/
10
10
  specs:
11
- actionmailer (2.3.14)
12
- actionpack (= 2.3.14)
13
- actionpack (2.3.14)
14
- activesupport (= 2.3.14)
11
+ actionmailer (2.3.16)
12
+ actionpack (= 2.3.16)
13
+ actionpack (2.3.16)
14
+ activesupport (= 2.3.16)
15
15
  rack (~> 1.1.0)
16
- activerecord (2.3.14)
17
- activesupport (= 2.3.14)
18
- activeresource (2.3.14)
19
- activesupport (= 2.3.14)
20
- activesupport (2.3.14)
21
- addressable (2.2.6)
22
- appraisal (0.4.0)
16
+ activerecord (2.3.16)
17
+ activesupport (= 2.3.16)
18
+ activeresource (2.3.16)
19
+ activesupport (= 2.3.16)
20
+ activesupport (2.3.16)
21
+ addressable (2.3.2)
22
+ ansi (1.4.3)
23
+ appraisal (0.5.1)
23
24
  bundler
24
25
  rake
25
26
  aruba (0.3.7)
26
27
  childprocess (>= 0.1.9)
27
28
  cucumber (>= 0.10.5)
28
29
  rspec (>= 2.6.0)
29
- bourne (1.0)
30
- mocha (= 0.9.8)
31
- builder (3.0.0)
32
- childprocess (0.2.2)
33
- ffi (~> 1.0.6)
34
- crack (0.3.1)
30
+ bourne (1.3.0)
31
+ mocha (= 0.13.0)
32
+ builder (3.1.4)
33
+ childprocess (0.3.7)
34
+ ffi (~> 1.0, >= 1.0.6)
35
+ crack (0.3.2)
35
36
  cucumber (0.10.7)
36
37
  builder (>= 2.1.2)
37
38
  diff-lcs (>= 1.1.2)
38
39
  gherkin (~> 2.4.0)
39
40
  json (>= 1.4.6)
40
41
  term-ansicolor (>= 1.0.5)
41
- daemons (1.1.4)
42
+ daemons (1.1.9)
42
43
  diff-lcs (1.1.3)
43
- eventmachine (0.12.10)
44
- ffi (1.0.11)
44
+ eventmachine (1.0.0)
45
+ ffi (1.3.1)
45
46
  gherkin (2.4.21)
46
47
  json (>= 1.4.6)
47
- i18n (0.6.0)
48
- json (1.6.1)
49
- mocha (0.9.8)
50
- rake
51
- rack (1.1.2)
52
- rails (2.3.14)
53
- actionmailer (= 2.3.14)
54
- actionpack (= 2.3.14)
55
- activerecord (= 2.3.14)
56
- activeresource (= 2.3.14)
57
- activesupport (= 2.3.14)
48
+ i18n (0.6.1)
49
+ json (1.7.6)
50
+ metaclass (0.0.1)
51
+ mocha (0.13.0)
52
+ metaclass (~> 0.0.1)
53
+ rack (1.1.5)
54
+ rails (2.3.16)
55
+ actionmailer (= 2.3.16)
56
+ actionpack (= 2.3.16)
57
+ activerecord (= 2.3.16)
58
+ activeresource (= 2.3.16)
59
+ activesupport (= 2.3.16)
58
60
  rake (>= 0.8.3)
59
- rake (0.9.2)
60
- rspec (2.7.0)
61
- rspec-core (~> 2.7.0)
62
- rspec-expectations (~> 2.7.0)
63
- rspec-mocks (~> 2.7.0)
64
- rspec-core (2.7.1)
65
- rspec-expectations (2.7.0)
66
- diff-lcs (~> 1.1.2)
67
- rspec-mocks (2.7.0)
68
- sham_rack (1.3.3)
61
+ rake (10.0.3)
62
+ rspec (2.12.0)
63
+ rspec-core (~> 2.12.0)
64
+ rspec-expectations (~> 2.12.0)
65
+ rspec-mocks (~> 2.12.0)
66
+ rspec-core (2.12.2)
67
+ rspec-expectations (2.12.1)
68
+ diff-lcs (~> 1.1.3)
69
+ rspec-mocks (2.12.2)
70
+ sham_rack (1.3.4)
69
71
  rack
70
- sinatra (1.2.7)
72
+ sinatra (1.2.8)
71
73
  rack (~> 1.1)
72
74
  tilt (>= 1.2.2, < 2.0)
73
- sqlite3 (1.3.4)
75
+ sqlite3 (1.3.7)
74
76
  sqlite3-ruby (1.3.3)
75
77
  sqlite3 (>= 1.3.3)
76
78
  term-ansicolor (1.0.7)
77
- thin (1.3.1)
79
+ thin (1.5.0)
78
80
  daemons (>= 1.0.9)
79
81
  eventmachine (>= 0.12.6)
80
82
  rack (>= 1.0.0)
81
83
  tilt (1.3.3)
82
- webmock (1.7.7)
83
- addressable (~> 2.2, > 2.2.5)
84
+ turn (0.9.6)
85
+ ansi
86
+ webmock (1.9.0)
87
+ addressable (>= 2.2.7)
84
88
  crack (>= 0.1.7)
85
- yard (0.7.3)
89
+ yard (0.8.4.1)
86
90
 
87
91
  PLATFORMS
88
92
  ruby
@@ -94,12 +98,13 @@ DEPENDENCIES
94
98
  copy_tuner_client!
95
99
  cucumber (~> 0.10.0)
96
100
  i18n
97
- rails (= 2.3.14)
98
- rake (= 0.9.2)
101
+ rails (= 2.3.16)
102
+ rake
99
103
  rspec (~> 2.3)
100
104
  sham_rack
101
105
  sinatra
102
106
  sqlite3-ruby
103
107
  thin
108
+ turn
104
109
  webmock
105
110
  yard
data/gemfiles/3.0.gemfile CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "rails", "3.0.3"
5
+ gem "rails", "3.0.20"
6
6
 
7
7
  gemspec :path=>"../"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/mat_aki/gem/copy-tuner-ruby-client
3
3
  specs:
4
- copy_tuner_client (0.0.1)
4
+ copy_tuner_client (0.0.2)
5
5
  i18n (>= 0.5.0)
6
6
  json
7
7
 
@@ -9,34 +9,35 @@ GEM
9
9
  remote: http://rubygems.org/
10
10
  specs:
11
11
  abstract (1.0.0)
12
- actionmailer (3.0.3)
13
- actionpack (= 3.0.3)
14
- mail (~> 2.2.9)
15
- actionpack (3.0.3)
16
- activemodel (= 3.0.3)
17
- activesupport (= 3.0.3)
12
+ actionmailer (3.0.20)
13
+ actionpack (= 3.0.20)
14
+ mail (~> 2.2.19)
15
+ actionpack (3.0.20)
16
+ activemodel (= 3.0.20)
17
+ activesupport (= 3.0.20)
18
18
  builder (~> 2.1.2)
19
19
  erubis (~> 2.6.6)
20
- i18n (~> 0.4)
21
- rack (~> 1.2.1)
22
- rack-mount (~> 0.6.13)
23
- rack-test (~> 0.5.6)
20
+ i18n (~> 0.5.0)
21
+ rack (~> 1.2.5)
22
+ rack-mount (~> 0.6.14)
23
+ rack-test (~> 0.5.7)
24
24
  tzinfo (~> 0.3.23)
25
- activemodel (3.0.3)
26
- activesupport (= 3.0.3)
25
+ activemodel (3.0.20)
26
+ activesupport (= 3.0.20)
27
27
  builder (~> 2.1.2)
28
- i18n (~> 0.4)
29
- activerecord (3.0.3)
30
- activemodel (= 3.0.3)
31
- activesupport (= 3.0.3)
32
- arel (~> 2.0.2)
28
+ i18n (~> 0.5.0)
29
+ activerecord (3.0.20)
30
+ activemodel (= 3.0.20)
31
+ activesupport (= 3.0.20)
32
+ arel (~> 2.0.10)
33
33
  tzinfo (~> 0.3.23)
34
- activeresource (3.0.3)
35
- activemodel (= 3.0.3)
36
- activesupport (= 3.0.3)
37
- activesupport (3.0.3)
38
- addressable (2.2.6)
39
- appraisal (0.4.0)
34
+ activeresource (3.0.20)
35
+ activemodel (= 3.0.20)
36
+ activesupport (= 3.0.20)
37
+ activesupport (3.0.20)
38
+ addressable (2.3.2)
39
+ ansi (1.4.3)
40
+ appraisal (0.5.1)
40
41
  bundler
41
42
  rake
42
43
  arel (2.0.10)
@@ -44,87 +45,93 @@ GEM
44
45
  childprocess (>= 0.1.9)
45
46
  cucumber (>= 0.10.5)
46
47
  rspec (>= 2.6.0)
47
- bourne (1.0)
48
- mocha (= 0.9.8)
48
+ bourne (1.3.0)
49
+ mocha (= 0.13.0)
49
50
  builder (2.1.2)
50
- childprocess (0.2.2)
51
- ffi (~> 1.0.6)
52
- crack (0.3.1)
51
+ childprocess (0.3.7)
52
+ ffi (~> 1.0, >= 1.0.6)
53
+ crack (0.3.2)
53
54
  cucumber (0.10.7)
54
55
  builder (>= 2.1.2)
55
56
  diff-lcs (>= 1.1.2)
56
57
  gherkin (~> 2.4.0)
57
58
  json (>= 1.4.6)
58
59
  term-ansicolor (>= 1.0.5)
59
- daemons (1.1.4)
60
+ daemons (1.1.9)
60
61
  diff-lcs (1.1.3)
61
62
  erubis (2.6.6)
62
63
  abstract (>= 1.0.0)
63
- eventmachine (0.12.10)
64
- ffi (1.0.11)
64
+ eventmachine (1.0.0)
65
+ ffi (1.3.1)
65
66
  gherkin (2.4.21)
66
67
  json (>= 1.4.6)
67
- i18n (0.6.0)
68
- json (1.6.1)
68
+ i18n (0.5.0)
69
+ json (1.7.6)
69
70
  mail (2.2.19)
70
71
  activesupport (>= 2.3.6)
71
72
  i18n (>= 0.4.0)
72
73
  mime-types (~> 1.16)
73
74
  treetop (~> 1.4.8)
74
- mime-types (1.17.2)
75
- mocha (0.9.8)
76
- rake
75
+ metaclass (0.0.1)
76
+ mime-types (1.20.1)
77
+ mocha (0.13.0)
78
+ metaclass (~> 0.0.1)
77
79
  polyglot (0.3.3)
78
- rack (1.2.4)
80
+ rack (1.2.7)
79
81
  rack-mount (0.6.14)
80
82
  rack (>= 1.0.0)
81
83
  rack-test (0.5.7)
82
84
  rack (>= 1.0)
83
- rails (3.0.3)
84
- actionmailer (= 3.0.3)
85
- actionpack (= 3.0.3)
86
- activerecord (= 3.0.3)
87
- activeresource (= 3.0.3)
88
- activesupport (= 3.0.3)
85
+ rails (3.0.20)
86
+ actionmailer (= 3.0.20)
87
+ actionpack (= 3.0.20)
88
+ activerecord (= 3.0.20)
89
+ activeresource (= 3.0.20)
90
+ activesupport (= 3.0.20)
89
91
  bundler (~> 1.0)
90
- railties (= 3.0.3)
91
- railties (3.0.3)
92
- actionpack (= 3.0.3)
93
- activesupport (= 3.0.3)
92
+ railties (= 3.0.20)
93
+ railties (3.0.20)
94
+ actionpack (= 3.0.20)
95
+ activesupport (= 3.0.20)
94
96
  rake (>= 0.8.7)
97
+ rdoc (~> 3.4)
95
98
  thor (~> 0.14.4)
96
- rake (0.9.2)
97
- rspec (2.7.0)
98
- rspec-core (~> 2.7.0)
99
- rspec-expectations (~> 2.7.0)
100
- rspec-mocks (~> 2.7.0)
101
- rspec-core (2.7.1)
102
- rspec-expectations (2.7.0)
103
- diff-lcs (~> 1.1.2)
104
- rspec-mocks (2.7.0)
105
- sham_rack (1.3.3)
99
+ rake (10.0.3)
100
+ rdoc (3.12)
101
+ json (~> 1.4)
102
+ rspec (2.12.0)
103
+ rspec-core (~> 2.12.0)
104
+ rspec-expectations (~> 2.12.0)
105
+ rspec-mocks (~> 2.12.0)
106
+ rspec-core (2.12.2)
107
+ rspec-expectations (2.12.1)
108
+ diff-lcs (~> 1.1.3)
109
+ rspec-mocks (2.12.2)
110
+ sham_rack (1.3.4)
106
111
  rack
107
- sinatra (1.2.7)
112
+ sinatra (1.2.8)
108
113
  rack (~> 1.1)
109
114
  tilt (>= 1.2.2, < 2.0)
110
- sqlite3 (1.3.4)
115
+ sqlite3 (1.3.7)
111
116
  sqlite3-ruby (1.3.3)
112
117
  sqlite3 (>= 1.3.3)
113
118
  term-ansicolor (1.0.7)
114
- thin (1.3.1)
119
+ thin (1.5.0)
115
120
  daemons (>= 1.0.9)
116
121
  eventmachine (>= 0.12.6)
117
122
  rack (>= 1.0.0)
118
123
  thor (0.14.6)
119
124
  tilt (1.3.3)
120
- treetop (1.4.10)
125
+ treetop (1.4.12)
121
126
  polyglot
122
127
  polyglot (>= 0.3.1)
123
- tzinfo (0.3.32)
124
- webmock (1.7.7)
125
- addressable (~> 2.2, > 2.2.5)
128
+ turn (0.9.6)
129
+ ansi
130
+ tzinfo (0.3.35)
131
+ webmock (1.9.0)
132
+ addressable (>= 2.2.7)
126
133
  crack (>= 0.1.7)
127
- yard (0.7.3)
134
+ yard (0.8.4.1)
128
135
 
129
136
  PLATFORMS
130
137
  ruby
@@ -136,12 +143,13 @@ DEPENDENCIES
136
143
  copy_tuner_client!
137
144
  cucumber (~> 0.10.0)
138
145
  i18n
139
- rails (= 3.0.3)
140
- rake (= 0.9.2)
146
+ rails (= 3.0.20)
147
+ rake
141
148
  rspec (~> 2.3)
142
149
  sham_rack
143
150
  sinatra
144
151
  sqlite3-ruby
145
152
  thin
153
+ turn
146
154
  webmock
147
155
  yard
data/gemfiles/3.1.gemfile CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "rails", "3.1.0"
5
+ gem "rails", "3.1.10"
6
6
  gem "jquery-rails"
7
7
  gem "uglifier"
8
8
  gem "sass-rails"
@@ -1,44 +1,44 @@
1
1
  PATH
2
2
  remote: /Users/mat_aki/gem/copy-tuner-ruby-client
3
3
  specs:
4
- copy_tuner_client (0.0.1)
4
+ copy_tuner_client (0.0.2)
5
5
  i18n (>= 0.5.0)
6
6
  json
7
7
 
8
8
  GEM
9
9
  remote: http://rubygems.org/
10
10
  specs:
11
- actionmailer (3.1.0)
12
- actionpack (= 3.1.0)
13
- mail (~> 2.3.0)
14
- actionpack (3.1.0)
15
- activemodel (= 3.1.0)
16
- activesupport (= 3.1.0)
11
+ actionmailer (3.1.10)
12
+ actionpack (= 3.1.10)
13
+ mail (~> 2.3.3)
14
+ actionpack (3.1.10)
15
+ activemodel (= 3.1.10)
16
+ activesupport (= 3.1.10)
17
17
  builder (~> 3.0.0)
18
18
  erubis (~> 2.7.0)
19
19
  i18n (~> 0.6)
20
- rack (~> 1.3.2)
21
- rack-cache (~> 1.0.3)
20
+ rack (~> 1.3.6)
21
+ rack-cache (~> 1.2)
22
22
  rack-mount (~> 0.8.2)
23
23
  rack-test (~> 0.6.1)
24
- sprockets (~> 2.0.0)
25
- activemodel (3.1.0)
26
- activesupport (= 3.1.0)
27
- bcrypt-ruby (~> 3.0.0)
24
+ sprockets (~> 2.0.4)
25
+ activemodel (3.1.10)
26
+ activesupport (= 3.1.10)
28
27
  builder (~> 3.0.0)
29
28
  i18n (~> 0.6)
30
- activerecord (3.1.0)
31
- activemodel (= 3.1.0)
32
- activesupport (= 3.1.0)
33
- arel (~> 2.2.1)
29
+ activerecord (3.1.10)
30
+ activemodel (= 3.1.10)
31
+ activesupport (= 3.1.10)
32
+ arel (~> 2.2.3)
34
33
  tzinfo (~> 0.3.29)
35
- activeresource (3.1.0)
36
- activemodel (= 3.1.0)
37
- activesupport (= 3.1.0)
38
- activesupport (3.1.0)
39
- multi_json (~> 1.0)
40
- addressable (2.2.7)
41
- appraisal (0.4.1)
34
+ activeresource (3.1.10)
35
+ activemodel (= 3.1.10)
36
+ activesupport (= 3.1.10)
37
+ activesupport (3.1.10)
38
+ multi_json (>= 1.0, < 1.3)
39
+ addressable (2.3.2)
40
+ ansi (1.4.3)
41
+ appraisal (0.5.1)
42
42
  bundler
43
43
  rake
44
44
  arel (2.2.3)
@@ -46,125 +46,126 @@ GEM
46
46
  childprocess (>= 0.1.9)
47
47
  cucumber (>= 0.10.5)
48
48
  rspec (>= 2.6.0)
49
- bcrypt-ruby (3.0.1)
50
- bourne (1.1.1)
51
- mocha (= 0.10.4)
52
- builder (3.0.0)
53
- childprocess (0.3.1)
54
- ffi (~> 1.0.6)
49
+ bourne (1.3.0)
50
+ mocha (= 0.13.0)
51
+ builder (3.0.4)
52
+ childprocess (0.3.7)
53
+ ffi (~> 1.0, >= 1.0.6)
55
54
  coffee-rails (3.1.1)
56
55
  coffee-script (>= 2.2.0)
57
56
  railties (~> 3.1.0)
58
57
  coffee-script (2.2.0)
59
58
  coffee-script-source
60
59
  execjs
61
- coffee-script-source (1.2.0)
62
- crack (0.3.1)
60
+ coffee-script-source (1.4.0)
61
+ crack (0.3.2)
63
62
  cucumber (0.10.7)
64
63
  builder (>= 2.1.2)
65
64
  diff-lcs (>= 1.1.2)
66
65
  gherkin (~> 2.4.0)
67
66
  json (>= 1.4.6)
68
67
  term-ansicolor (>= 1.0.5)
69
- daemons (1.1.8)
68
+ daemons (1.1.9)
70
69
  diff-lcs (1.1.3)
71
70
  erubis (2.7.0)
72
- eventmachine (0.12.10)
73
- execjs (1.3.0)
71
+ eventmachine (1.0.0)
72
+ execjs (1.4.0)
74
73
  multi_json (~> 1.0)
75
- ffi (1.0.11)
74
+ ffi (1.3.1)
76
75
  gherkin (2.4.21)
77
76
  json (>= 1.4.6)
78
77
  hike (1.2.1)
79
- i18n (0.6.0)
80
- jquery-rails (1.0.19)
81
- railties (~> 3.0)
82
- thor (~> 0.14)
83
- json (1.6.5)
78
+ i18n (0.6.1)
79
+ jquery-rails (2.2.0)
80
+ railties (>= 3.0, < 5.0)
81
+ thor (>= 0.14, < 2.0)
82
+ json (1.7.6)
84
83
  mail (2.3.3)
85
84
  i18n (>= 0.4.0)
86
85
  mime-types (~> 1.16)
87
86
  treetop (~> 1.4.8)
88
87
  metaclass (0.0.1)
89
- mime-types (1.17.2)
90
- mocha (0.10.4)
88
+ mime-types (1.20.1)
89
+ mocha (0.13.0)
91
90
  metaclass (~> 0.0.1)
92
- multi_json (1.1.0)
91
+ multi_json (1.2.0)
93
92
  polyglot (0.3.3)
94
- rack (1.3.6)
95
- rack-cache (1.0.3)
93
+ rack (1.3.9)
94
+ rack-cache (1.2)
96
95
  rack (>= 0.4)
97
96
  rack-mount (0.8.3)
98
97
  rack (>= 1.0.0)
99
- rack-protection (1.2.0)
98
+ rack-protection (1.3.2)
100
99
  rack
101
- rack-ssl (1.3.2)
100
+ rack-ssl (1.3.3)
102
101
  rack
103
- rack-test (0.6.1)
102
+ rack-test (0.6.2)
104
103
  rack (>= 1.0)
105
- rails (3.1.0)
106
- actionmailer (= 3.1.0)
107
- actionpack (= 3.1.0)
108
- activerecord (= 3.1.0)
109
- activeresource (= 3.1.0)
110
- activesupport (= 3.1.0)
104
+ rails (3.1.10)
105
+ actionmailer (= 3.1.10)
106
+ actionpack (= 3.1.10)
107
+ activerecord (= 3.1.10)
108
+ activeresource (= 3.1.10)
109
+ activesupport (= 3.1.10)
111
110
  bundler (~> 1.0)
112
- railties (= 3.1.0)
113
- railties (3.1.0)
114
- actionpack (= 3.1.0)
115
- activesupport (= 3.1.0)
111
+ railties (= 3.1.10)
112
+ railties (3.1.10)
113
+ actionpack (= 3.1.10)
114
+ activesupport (= 3.1.10)
116
115
  rack-ssl (~> 1.3.2)
117
116
  rake (>= 0.8.7)
118
117
  rdoc (~> 3.4)
119
118
  thor (~> 0.14.6)
120
- rake (0.9.2)
119
+ rake (10.0.3)
121
120
  rdoc (3.12)
122
121
  json (~> 1.4)
123
- rspec (2.8.0)
124
- rspec-core (~> 2.8.0)
125
- rspec-expectations (~> 2.8.0)
126
- rspec-mocks (~> 2.8.0)
127
- rspec-core (2.8.0)
128
- rspec-expectations (2.8.0)
129
- diff-lcs (~> 1.1.2)
130
- rspec-mocks (2.8.0)
131
- sass (3.1.15)
132
- sass-rails (3.1.5)
122
+ rspec (2.12.0)
123
+ rspec-core (~> 2.12.0)
124
+ rspec-expectations (~> 2.12.0)
125
+ rspec-mocks (~> 2.12.0)
126
+ rspec-core (2.12.2)
127
+ rspec-expectations (2.12.1)
128
+ diff-lcs (~> 1.1.3)
129
+ rspec-mocks (2.12.2)
130
+ sass (3.2.5)
131
+ sass-rails (3.1.7)
133
132
  actionpack (~> 3.1.0)
134
133
  railties (~> 3.1.0)
135
- sass (~> 3.1.10)
134
+ sass (>= 3.1.10)
136
135
  tilt (~> 1.3.2)
137
- sham_rack (1.3.3)
136
+ sham_rack (1.3.4)
138
137
  rack
139
- sinatra (1.3.2)
138
+ sinatra (1.3.3)
140
139
  rack (~> 1.3, >= 1.3.6)
141
140
  rack-protection (~> 1.2)
142
141
  tilt (~> 1.3, >= 1.3.3)
143
- sprockets (2.0.3)
142
+ sprockets (2.0.4)
144
143
  hike (~> 1.2)
145
144
  rack (~> 1.0)
146
145
  tilt (~> 1.1, != 1.3.0)
147
- sqlite3 (1.3.5)
146
+ sqlite3 (1.3.7)
148
147
  sqlite3-ruby (1.3.3)
149
148
  sqlite3 (>= 1.3.3)
150
149
  term-ansicolor (1.0.7)
151
- thin (1.3.1)
150
+ thin (1.5.0)
152
151
  daemons (>= 1.0.9)
153
152
  eventmachine (>= 0.12.6)
154
153
  rack (>= 1.0.0)
155
154
  thor (0.14.6)
156
155
  tilt (1.3.3)
157
- treetop (1.4.10)
156
+ treetop (1.4.12)
158
157
  polyglot
159
158
  polyglot (>= 0.3.1)
160
- tzinfo (0.3.32)
161
- uglifier (1.2.3)
159
+ turn (0.9.6)
160
+ ansi
161
+ tzinfo (0.3.35)
162
+ uglifier (1.3.0)
162
163
  execjs (>= 0.3.0)
163
- multi_json (>= 1.0.2)
164
- webmock (1.8.3)
164
+ multi_json (~> 1.0, >= 1.0.2)
165
+ webmock (1.9.0)
165
166
  addressable (>= 2.2.7)
166
167
  crack (>= 0.1.7)
167
- yard (0.7.5)
168
+ yard (0.8.4.1)
168
169
 
169
170
  PLATFORMS
170
171
  ruby
@@ -178,14 +179,15 @@ DEPENDENCIES
178
179
  cucumber (~> 0.10.0)
179
180
  i18n
180
181
  jquery-rails
181
- rails (= 3.1.0)
182
- rake (= 0.9.2)
182
+ rails (= 3.1.10)
183
+ rake
183
184
  rspec (~> 2.3)
184
185
  sass-rails
185
186
  sham_rack
186
187
  sinatra
187
188
  sqlite3-ruby
188
189
  thin
190
+ turn
189
191
  uglifier
190
192
  webmock
191
193
  yard
@@ -15,7 +15,7 @@ module CopyTunerClient
15
15
  OPTIONS = [:api_key, :development_environments, :environment_name, :host,
16
16
  :http_open_timeout, :http_read_timeout, :client_name, :client_url,
17
17
  :client_version, :port, :protocol, :proxy_host, :proxy_pass,
18
- :proxy_port, :proxy_user, :secure, :polling_delay, :logger,
18
+ :proxy_port, :proxy_user, :secure, :polling_delay, :sync_interval, :sync_interval_staging, :logger,
19
19
  :framework, :middleware, :ca_file].freeze
20
20
 
21
21
  # @return [String] The API key for your project, found on the project edit form.
@@ -72,6 +72,12 @@ module CopyTunerClient
72
72
  # @return [Integer] The time, in seconds, in between each sync to the server. Defaults to +300+.
73
73
  attr_accessor :polling_delay
74
74
 
75
+ # @return [Integer] The time, in seconds, in between each sync to the server in development. Defaults to +60+.
76
+ attr_accessor :sync_interval
77
+
78
+ # @return [Integer] The time, in seconds, in between each sync to the server in development. Defaults to +60+.
79
+ attr_accessor :sync_interval_staging
80
+
75
81
  # @return [Logger] Where to log messages. Must respond to same interface as Logger.
76
82
  attr_reader :logger
77
83
 
@@ -100,6 +106,8 @@ module CopyTunerClient
100
106
  self.http_read_timeout = 5
101
107
  self.logger = Logger.new($stdout)
102
108
  self.polling_delay = 300
109
+ self.sync_interval = 60
110
+ self.sync_interval_staging = 0
103
111
  self.secure = false
104
112
  self.test_environments = %w(test cucumber)
105
113
  @applied = false
@@ -171,7 +179,7 @@ module CopyTunerClient
171
179
  I18n.backend = I18nBackend.new(cache)
172
180
 
173
181
  if middleware && development?
174
- middleware.use RequestSync, :cache => cache
182
+ middleware.use RequestSync, :cache => cache, :interval => sync_interval
175
183
  end
176
184
 
177
185
  @applied = true
@@ -211,6 +219,15 @@ module CopyTunerClient
211
219
  @logger = PrefixedLogger.new("** [CopyTuner]", original_logger)
212
220
  end
213
221
 
222
+ # Sync interval for Rack Middleware
223
+ def sync_interval
224
+ if environment_name == "staging"
225
+ @sync_interval_staging
226
+ else
227
+ @sync_interval
228
+ end
229
+ end
230
+
214
231
  private
215
232
 
216
233
  def default_port
@@ -9,10 +9,12 @@ module CopyTunerClient
9
9
  def initialize(app, options)
10
10
  @app = app
11
11
  @cache = options[:cache]
12
- @interval = options[:interval] || 1.minutes
13
- @last_synced = Time.now.utc
12
+ @interval = options[:interval]
13
+ @last_synced = options[:last_synced]
14
14
  end
15
15
 
16
+ attr_accessor :last_synced
17
+
16
18
  # Invokes the upstream Rack application and flushes the cache after each
17
19
  # request.
18
20
  def call(env)
@@ -29,6 +31,8 @@ module CopyTunerClient
29
31
  end
30
32
 
31
33
  def in_interval?
34
+ return false if @last_synced.nil?
35
+ return false if @interval <= 0
32
36
  @last_synced + @interval > Time.now.utc
33
37
  end
34
38
 
@@ -1,6 +1,6 @@
1
1
  module CopyTunerClient
2
2
  # Client version
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.2'
4
4
 
5
5
  # API version being used to communicate with the server
6
6
  API_VERSION = '2.0'.freeze
@@ -7,7 +7,7 @@ describe CopyTunerClient::RequestSync do
7
7
  let(:env) { 'env' }
8
8
  let(:app) { stub('app', :call => response) }
9
9
  before { cache.stubs(:flush => nil, :download => nil) }
10
- subject { CopyTunerClient::RequestSync.new(app, :cache => cache) }
10
+ subject { CopyTunerClient::RequestSync.new(app, :cache => cache, :interval => 0) }
11
11
 
12
12
  it "invokes the upstream app" do
13
13
  result = subject.call(env)
@@ -34,7 +34,7 @@ describe CopyTunerClient::RequestSync, 'serving assets' do
34
34
  let(:response) { 'response' }
35
35
  let(:app) { stub('app', :call => response) }
36
36
  before { cache.stubs(:flush => nil, :download => nil) }
37
- subject { CopyTunerClient::RequestSync.new(app, :cache => cache) }
37
+ subject { CopyTunerClient::RequestSync.new(app, :cache => cache, :interval => 0) }
38
38
 
39
39
  it "does not flush defaults" do
40
40
  subject.call(env)
@@ -45,3 +45,47 @@ describe CopyTunerClient::RequestSync, 'serving assets' do
45
45
  cache.should_not have_received(:download)
46
46
  end
47
47
  end
48
+
49
+ describe CopyTunerClient::RequestSync do
50
+ let(:cache) { {} }
51
+ let(:response) { 'response' }
52
+ let(:env) { 'env' }
53
+ let(:app) { stub('app', :call => response) }
54
+ before { cache.stubs(:flush => nil, :download => nil) }
55
+
56
+ context 'in interval request' do
57
+ subject { CopyTunerClient::RequestSync.new(app, :cache => cache, :interval => 10, last_synced: Time.now) }
58
+ it "does not flush defaults" do
59
+ subject.call(env)
60
+ cache.should_not have_received(:flush)
61
+ end
62
+ it "does not download new copy" do
63
+ subject.call(env)
64
+ cache.should_not have_received(:download)
65
+ end
66
+ end
67
+
68
+ context 'over interval request' do
69
+ subject { CopyTunerClient::RequestSync.new(app, :cache => cache, :interval => 10, last_synced: Time.now - 60) }
70
+ it "flushes defaults" do
71
+ subject.call(env)
72
+ cache.should have_received(:flush)
73
+ end
74
+ it "downloads new copy" do
75
+ subject.call(env)
76
+ cache.should have_received(:download)
77
+ end
78
+ end
79
+
80
+ context "first request" do
81
+ subject { CopyTunerClient::RequestSync.new(app, :cache => cache, :interval => 10) }
82
+ it "flushes defaults" do
83
+ subject.call(env)
84
+ cache.should have_received(:flush)
85
+ end
86
+ it "downloads new copy" do
87
+ subject.call(env)
88
+ cache.should have_received(:download)
89
+ end
90
+ end
91
+ end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: copy_tuner_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
- - thoughtbot
8
+ - SonicGarden
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-17 00:00:00.000000000 Z
12
+ date: 2013-02-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n
@@ -144,17 +144,17 @@ dependencies:
144
144
  requirement: !ruby/object:Gem::Requirement
145
145
  none: false
146
146
  requirements:
147
- - - '='
147
+ - - ! '>='
148
148
  - !ruby/object:Gem::Version
149
- version: 0.9.2
149
+ version: '0'
150
150
  type: :development
151
151
  prerelease: false
152
152
  version_requirements: !ruby/object:Gem::Requirement
153
153
  none: false
154
154
  requirements:
155
- - - '='
155
+ - - ! '>='
156
156
  - !ruby/object:Gem::Version
157
- version: 0.9.2
157
+ version: '0'
158
158
  - !ruby/object:Gem::Dependency
159
159
  name: rspec
160
160
  requirement: !ruby/object:Gem::Requirement
@@ -267,8 +267,24 @@ dependencies:
267
267
  - - ! '>='
268
268
  - !ruby/object:Gem::Version
269
269
  version: '0'
270
+ - !ruby/object:Gem::Dependency
271
+ name: turn
272
+ requirement: !ruby/object:Gem::Requirement
273
+ none: false
274
+ requirements:
275
+ - - ! '>='
276
+ - !ruby/object:Gem::Version
277
+ version: '0'
278
+ type: :development
279
+ prerelease: false
280
+ version_requirements: !ruby/object:Gem::Requirement
281
+ none: false
282
+ requirements:
283
+ - - ! '>='
284
+ - !ruby/object:Gem::Version
285
+ version: '0'
270
286
  description:
271
- email: support@thoughtbot.com
287
+ email: info@sonicgarden.jp
272
288
  executables: []
273
289
  extensions: []
274
290
  extra_rdoc_files: []
@@ -344,7 +360,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
344
360
  version: '0'
345
361
  segments:
346
362
  - 0
347
- hash: -2202322901748075796
363
+ hash: 3859046982728401984
348
364
  required_rubygems_version: !ruby/object:Gem::Requirement
349
365
  none: false
350
366
  requirements:
@@ -353,7 +369,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
353
369
  version: '0'
354
370
  segments:
355
371
  - 0
356
- hash: -2202322901748075796
372
+ hash: 3859046982728401984
357
373
  requirements: []
358
374
  rubyforge_project:
359
375
  rubygems_version: 1.8.23