copycopter_client 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ --- {}
2
+
@@ -0,0 +1,17 @@
1
+ log/*
2
+ tmp/**/*
3
+ tmp/*
4
+ coverage/*
5
+ rdoc/
6
+ tags
7
+
8
+ db/schema.rb
9
+ db/*.sqlite3
10
+ public/system
11
+
12
+ *.swp
13
+ *.DS_Store
14
+ .yardoc
15
+ doc
16
+ pkg
17
+ *.gem
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format documentation
@@ -0,0 +1,15 @@
1
+ appraise "2.3" do
2
+ gem "rails", "~> 2.3"
3
+ end
4
+
5
+ appraise "3.0" do
6
+ gem "rails", "~> 3.0.3"
7
+ end
8
+
9
+ appraise "3.1" do
10
+ gem "rails", "~> 3.1.0"
11
+ gem "jquery-rails"
12
+ gem "uglifier"
13
+ gem "sass-rails"
14
+ gem "coffee-rails"
15
+ end
@@ -0,0 +1,38 @@
1
+ We love pull requests. Here's a quick guide:
2
+
3
+ 1. Fork the repo.
4
+
5
+ 2. Run the tests. We only take pull requests with passing tests, and it's great
6
+ to know that you have a clean slate: `bundle && rake`
7
+
8
+ 3. Add a test for your change. Only refactoring and documentation changes
9
+ require no new tests. If you are adding functionality or fixing a bug, we need
10
+ a test!
11
+
12
+ 4. Make the test pass.
13
+
14
+ 5. Push to your fork and submit a pull request.
15
+
16
+
17
+ At this point you're waiting on us. We like to at least comment on, if not
18
+ accept, pull requests within three business days (and, typically, one business
19
+ day). We may suggest some changes or improvements or alternatives.
20
+
21
+ Some things that will increase the chance that your pull request is accepted,
22
+ taken straight from the Ruby on Rails guide:
23
+
24
+ * Use Rails idioms and helpers
25
+ * Include tests that fail without your code, and pass with it
26
+ * Update the documentation, the surrounding one, examples elsewhere, guides,
27
+ whatever is affected by your contribution
28
+
29
+ Syntax:
30
+
31
+ * Two spaces, no tabs.
32
+ * No trailing whitespace. Blank lines should not have any space.
33
+ * Prefer &&/|| over and/or.
34
+ * MyClass.my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
35
+ * a = b and not a=b.
36
+ * Follow the conventions you see used in the source already.
37
+
38
+ And in case we didn't emphasize it enough: we love tests!
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "http://rubygems.org"
2
+
3
+ gemspec
@@ -0,0 +1,161 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ copycopter_client (1.1.2)
5
+ i18n (>= 0.5.0)
6
+ json
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
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)
17
+ builder (~> 3.0.0)
18
+ erubis (~> 2.7.0)
19
+ i18n (~> 0.6)
20
+ rack (~> 1.3.2)
21
+ rack-cache (~> 1.0.3)
22
+ rack-mount (~> 0.8.2)
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)
28
+ builder (~> 3.0.0)
29
+ i18n (~> 0.6)
30
+ activerecord (3.1.0)
31
+ activemodel (= 3.1.0)
32
+ activesupport (= 3.1.0)
33
+ arel (~> 2.2.1)
34
+ 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.6)
41
+ appraisal (0.4.0)
42
+ bundler
43
+ rake
44
+ arel (2.2.1)
45
+ aruba (0.3.7)
46
+ childprocess (>= 0.1.9)
47
+ cucumber (>= 0.10.5)
48
+ rspec (>= 2.6.0)
49
+ bcrypt-ruby (3.0.0)
50
+ bourne (1.0)
51
+ mocha (= 0.9.8)
52
+ builder (3.0.0)
53
+ childprocess (0.2.2)
54
+ ffi (~> 1.0.6)
55
+ crack (0.1.8)
56
+ cucumber (0.10.7)
57
+ builder (>= 2.1.2)
58
+ diff-lcs (>= 1.1.2)
59
+ gherkin (~> 2.4.0)
60
+ json (>= 1.4.6)
61
+ term-ansicolor (>= 1.0.5)
62
+ daemons (1.1.4)
63
+ diff-lcs (1.1.3)
64
+ erubis (2.7.0)
65
+ eventmachine (0.12.10)
66
+ ffi (1.0.9)
67
+ gherkin (2.4.18)
68
+ json (>= 1.4.6)
69
+ hike (1.2.1)
70
+ i18n (0.6.0)
71
+ json (1.5.4)
72
+ mail (2.3.0)
73
+ i18n (>= 0.4.0)
74
+ mime-types (~> 1.16)
75
+ treetop (~> 1.4.8)
76
+ mime-types (1.16)
77
+ mocha (0.9.8)
78
+ rake
79
+ multi_json (1.0.3)
80
+ polyglot (0.3.2)
81
+ rack (1.3.2)
82
+ rack-cache (1.0.3)
83
+ rack (>= 0.4)
84
+ rack-mount (0.8.3)
85
+ rack (>= 1.0.0)
86
+ rack-ssl (1.3.2)
87
+ rack
88
+ rack-test (0.6.1)
89
+ rack (>= 1.0)
90
+ rails (3.1.0)
91
+ actionmailer (= 3.1.0)
92
+ actionpack (= 3.1.0)
93
+ activerecord (= 3.1.0)
94
+ activeresource (= 3.1.0)
95
+ activesupport (= 3.1.0)
96
+ bundler (~> 1.0)
97
+ railties (= 3.1.0)
98
+ railties (3.1.0)
99
+ actionpack (= 3.1.0)
100
+ activesupport (= 3.1.0)
101
+ rack-ssl (~> 1.3.2)
102
+ rake (>= 0.8.7)
103
+ rdoc (~> 3.4)
104
+ thor (~> 0.14.6)
105
+ rake (0.9.2)
106
+ rdoc (3.9.4)
107
+ rspec (2.6.0)
108
+ rspec-core (~> 2.6.0)
109
+ rspec-expectations (~> 2.6.0)
110
+ rspec-mocks (~> 2.6.0)
111
+ rspec-core (2.6.4)
112
+ rspec-expectations (2.6.0)
113
+ diff-lcs (~> 1.1.2)
114
+ rspec-mocks (2.6.0)
115
+ sham_rack (1.3.3)
116
+ rack
117
+ sinatra (1.2.6)
118
+ rack (~> 1.1)
119
+ tilt (>= 1.2.2, < 2.0)
120
+ sprockets (2.0.0)
121
+ hike (~> 1.2)
122
+ rack (~> 1.0)
123
+ tilt (~> 1.1, != 1.3.0)
124
+ sqlite3 (1.3.4)
125
+ sqlite3-ruby (1.3.3)
126
+ sqlite3 (>= 1.3.3)
127
+ term-ansicolor (1.0.6)
128
+ thin (1.2.11)
129
+ daemons (>= 1.0.9)
130
+ eventmachine (>= 0.12.6)
131
+ rack (>= 1.0.0)
132
+ thor (0.14.6)
133
+ tilt (1.3.3)
134
+ treetop (1.4.10)
135
+ polyglot
136
+ polyglot (>= 0.3.1)
137
+ tzinfo (0.3.29)
138
+ webmock (1.7.6)
139
+ addressable (~> 2.2, > 2.2.5)
140
+ crack (>= 0.1.7)
141
+ yard (0.7.2)
142
+
143
+ PLATFORMS
144
+ ruby
145
+
146
+ DEPENDENCIES
147
+ appraisal (~> 0.4)
148
+ aruba (~> 0.3.2)
149
+ bourne
150
+ copycopter_client!
151
+ cucumber (~> 0.10.0)
152
+ i18n
153
+ rails (~> 3.1.0)
154
+ rake (= 0.9.2)
155
+ rspec (~> 2.3)
156
+ sham_rack
157
+ sinatra
158
+ sqlite3-ruby
159
+ thin
160
+ webmock
161
+ yard
data/Rakefile CHANGED
@@ -1,9 +1,5 @@
1
- require 'rubygems'
2
- require 'bundler/setup'
1
+ require 'bundler/gem_tasks'
3
2
  require 'appraisal'
4
- require 'rake'
5
- require 'rake/testtask'
6
- require 'rubygems/package_task'
7
3
  require 'cucumber/rake/task'
8
4
  require 'rspec/core/rake_task'
9
5
  require 'yard'
@@ -28,22 +24,3 @@ end
28
24
  YARD::Rake::YardocTask.new do |t|
29
25
  t.files = ['lib/**/*.rb']
30
26
  end
31
-
32
- eval("$specification = begin; #{IO.read('copycopter_client.gemspec')}; end")
33
- Gem::PackageTask.new($specification) do |package|
34
- package.need_zip = true
35
- package.need_tar = true
36
- end
37
-
38
- gem_file = "pkg/#{$specification.name}-#{$specification.version}.gem"
39
-
40
- desc "Build and install the latest gem"
41
- task :install => :gem do
42
- sh("gem install --local #{gem_file}")
43
- end
44
-
45
- desc "Build and release the latest gem"
46
- task :release => :gem do
47
- sh("gem push #{gem_file}")
48
- end
49
-
@@ -0,0 +1,36 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $LOAD_PATH.push File.expand_path("../lib", __FILE__)
3
+ require 'copycopter_client/version'
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "copycopter_client"
7
+ s.version = CopycopterClient::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["thoughtbot"]
10
+ s.email = "support@thoughtbot.com"
11
+ s.homepage = "http://github.com/thoughtbot/copycopter_client"
12
+ s.summary = "Client for the Copycopter content management service"
13
+
14
+ s.files = `git ls-files`.split("\n")
15
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
+ s.require_paths = ["lib"]
18
+
19
+ s.add_dependency('i18n', '>= 0.5.0')
20
+ s.add_dependency('json')
21
+
22
+ s.add_development_dependency('rails', '~> 3.1.0')
23
+ s.add_development_dependency('sqlite3-ruby')
24
+ s.add_development_dependency('rspec', '~> 2.3')
25
+ s.add_development_dependency('bourne')
26
+ s.add_development_dependency('webmock')
27
+ s.add_development_dependency('rake', '0.9.2')
28
+ s.add_development_dependency('sham_rack')
29
+ s.add_development_dependency('cucumber', '~> 0.10.0')
30
+ s.add_development_dependency('aruba', '~> 0.3.2')
31
+ s.add_development_dependency('sinatra')
32
+ s.add_development_dependency('yard')
33
+ s.add_development_dependency('thin')
34
+ s.add_development_dependency('i18n')
35
+ s.add_development_dependency('appraisal', '~> 0.4')
36
+ end
@@ -245,7 +245,7 @@ Feature: Using copycopter in a rails app
245
245
  | en.threaded.key | all your base |
246
246
 
247
247
  Scenario: support pluralization
248
- When I write to "app/controllers/users_controller.rb" with:
248
+ Given I write to "app/controllers/users_controller.rb" with:
249
249
  """
250
250
  class UsersController < ActionController::Base
251
251
  def index
@@ -253,7 +253,7 @@ Feature: Using copycopter in a rails app
253
253
  end
254
254
  end
255
255
  """
256
- When I route the "users" resource
256
+ And I route the "users" resource
257
257
  And I write to "app/views/users/index.html.erb" with:
258
258
  """
259
259
  <%= time_ago_in_words(1.hour.ago) %> ago
@@ -34,7 +34,7 @@ class RailsServer
34
34
  $stderr = StringIO.new
35
35
  end
36
36
 
37
- require 'config/environment'
37
+ require './config/environment'
38
38
  require 'thin'
39
39
 
40
40
  if Rails::VERSION::MAJOR == 3
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "rails", "~> 2.3"
6
+
7
+ gemspec :path=>"../"
@@ -0,0 +1,105 @@
1
+ PATH
2
+ remote: /Users/joshuaclayton/dev/thoughtbot/copycopter_client
3
+ specs:
4
+ copycopter_client (1.1.2)
5
+ i18n (>= 0.5.0)
6
+ json
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ actionmailer (2.3.14)
12
+ actionpack (= 2.3.14)
13
+ actionpack (2.3.14)
14
+ activesupport (= 2.3.14)
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)
23
+ bundler
24
+ rake
25
+ aruba (0.3.7)
26
+ childprocess (>= 0.1.9)
27
+ cucumber (>= 0.10.5)
28
+ 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)
35
+ cucumber (0.10.7)
36
+ builder (>= 2.1.2)
37
+ diff-lcs (>= 1.1.2)
38
+ gherkin (~> 2.4.0)
39
+ json (>= 1.4.6)
40
+ term-ansicolor (>= 1.0.5)
41
+ daemons (1.1.4)
42
+ diff-lcs (1.1.3)
43
+ eventmachine (0.12.10)
44
+ ffi (1.0.11)
45
+ gherkin (2.4.21)
46
+ 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)
58
+ 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)
69
+ rack
70
+ sinatra (1.2.7)
71
+ rack (~> 1.1)
72
+ tilt (>= 1.2.2, < 2.0)
73
+ sqlite3 (1.3.4)
74
+ sqlite3-ruby (1.3.3)
75
+ sqlite3 (>= 1.3.3)
76
+ term-ansicolor (1.0.7)
77
+ thin (1.3.1)
78
+ daemons (>= 1.0.9)
79
+ eventmachine (>= 0.12.6)
80
+ rack (>= 1.0.0)
81
+ tilt (1.3.3)
82
+ webmock (1.7.7)
83
+ addressable (~> 2.2, > 2.2.5)
84
+ crack (>= 0.1.7)
85
+ yard (0.7.3)
86
+
87
+ PLATFORMS
88
+ ruby
89
+
90
+ DEPENDENCIES
91
+ appraisal (~> 0.4)
92
+ aruba (~> 0.3.2)
93
+ bourne
94
+ copycopter_client!
95
+ cucumber (~> 0.10.0)
96
+ i18n
97
+ rails (~> 2.3)
98
+ rake (= 0.9.2)
99
+ rspec (~> 2.3)
100
+ sham_rack
101
+ sinatra
102
+ sqlite3-ruby
103
+ thin
104
+ webmock
105
+ yard
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "rails", "~> 3.0.3"
6
+
7
+ gemspec :path=>"../"
@@ -0,0 +1,147 @@
1
+ PATH
2
+ remote: /Users/joshuaclayton/dev/thoughtbot/copycopter_client
3
+ specs:
4
+ copycopter_client (1.1.2)
5
+ i18n (>= 0.5.0)
6
+ json
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ abstract (1.0.0)
12
+ actionmailer (3.0.5)
13
+ actionpack (= 3.0.5)
14
+ mail (~> 2.2.15)
15
+ actionpack (3.0.5)
16
+ activemodel (= 3.0.5)
17
+ activesupport (= 3.0.5)
18
+ builder (~> 2.1.2)
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.7)
24
+ tzinfo (~> 0.3.23)
25
+ activemodel (3.0.5)
26
+ activesupport (= 3.0.5)
27
+ builder (~> 2.1.2)
28
+ i18n (~> 0.4)
29
+ activerecord (3.0.5)
30
+ activemodel (= 3.0.5)
31
+ activesupport (= 3.0.5)
32
+ arel (~> 2.0.2)
33
+ tzinfo (~> 0.3.23)
34
+ activeresource (3.0.5)
35
+ activemodel (= 3.0.5)
36
+ activesupport (= 3.0.5)
37
+ activesupport (3.0.5)
38
+ addressable (2.2.6)
39
+ appraisal (0.4.0)
40
+ bundler
41
+ rake
42
+ arel (2.0.10)
43
+ aruba (0.3.7)
44
+ childprocess (>= 0.1.9)
45
+ cucumber (>= 0.10.5)
46
+ rspec (>= 2.6.0)
47
+ bourne (1.0)
48
+ mocha (= 0.9.8)
49
+ builder (2.1.2)
50
+ childprocess (0.2.2)
51
+ ffi (~> 1.0.6)
52
+ crack (0.3.1)
53
+ cucumber (0.10.7)
54
+ builder (>= 2.1.2)
55
+ diff-lcs (>= 1.1.2)
56
+ gherkin (~> 2.4.0)
57
+ json (>= 1.4.6)
58
+ term-ansicolor (>= 1.0.5)
59
+ daemons (1.1.4)
60
+ diff-lcs (1.1.3)
61
+ erubis (2.6.6)
62
+ abstract (>= 1.0.0)
63
+ eventmachine (0.12.10)
64
+ ffi (1.0.11)
65
+ gherkin (2.4.21)
66
+ json (>= 1.4.6)
67
+ i18n (0.6.0)
68
+ json (1.6.1)
69
+ mail (2.2.19)
70
+ activesupport (>= 2.3.6)
71
+ i18n (>= 0.4.0)
72
+ mime-types (~> 1.16)
73
+ treetop (~> 1.4.8)
74
+ mime-types (1.17.2)
75
+ mocha (0.9.8)
76
+ rake
77
+ polyglot (0.3.3)
78
+ rack (1.2.4)
79
+ rack-mount (0.6.14)
80
+ rack (>= 1.0.0)
81
+ rack-test (0.5.7)
82
+ rack (>= 1.0)
83
+ rails (3.0.5)
84
+ actionmailer (= 3.0.5)
85
+ actionpack (= 3.0.5)
86
+ activerecord (= 3.0.5)
87
+ activeresource (= 3.0.5)
88
+ activesupport (= 3.0.5)
89
+ bundler (~> 1.0)
90
+ railties (= 3.0.5)
91
+ railties (3.0.5)
92
+ actionpack (= 3.0.5)
93
+ activesupport (= 3.0.5)
94
+ rake (>= 0.8.7)
95
+ 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)
106
+ rack
107
+ sinatra (1.2.7)
108
+ rack (~> 1.1)
109
+ tilt (>= 1.2.2, < 2.0)
110
+ sqlite3 (1.3.4)
111
+ sqlite3-ruby (1.3.3)
112
+ sqlite3 (>= 1.3.3)
113
+ term-ansicolor (1.0.7)
114
+ thin (1.3.1)
115
+ daemons (>= 1.0.9)
116
+ eventmachine (>= 0.12.6)
117
+ rack (>= 1.0.0)
118
+ thor (0.14.6)
119
+ tilt (1.3.3)
120
+ treetop (1.4.10)
121
+ polyglot
122
+ polyglot (>= 0.3.1)
123
+ tzinfo (0.3.31)
124
+ webmock (1.7.7)
125
+ addressable (~> 2.2, > 2.2.5)
126
+ crack (>= 0.1.7)
127
+ yard (0.7.3)
128
+
129
+ PLATFORMS
130
+ ruby
131
+
132
+ DEPENDENCIES
133
+ appraisal (~> 0.4)
134
+ aruba (~> 0.3.2)
135
+ bourne
136
+ copycopter_client!
137
+ cucumber (~> 0.10.0)
138
+ i18n
139
+ rails (~> 3.0.3)
140
+ rake (= 0.9.2)
141
+ rspec (~> 2.3)
142
+ sham_rack
143
+ sinatra
144
+ sqlite3-ruby
145
+ thin
146
+ webmock
147
+ yard
@@ -0,0 +1,11 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "rails", "~> 3.1.0"
6
+ gem "jquery-rails"
7
+ gem "uglifier"
8
+ gem "sass-rails"
9
+ gem "coffee-rails"
10
+
11
+ gemspec :path=>"../"
@@ -0,0 +1,189 @@
1
+ PATH
2
+ remote: /Users/joshuaclayton/dev/thoughtbot/copycopter_client
3
+ specs:
4
+ copycopter_client (1.1.2)
5
+ i18n (>= 0.5.0)
6
+ json
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ actionmailer (3.1.1)
12
+ actionpack (= 3.1.1)
13
+ mail (~> 2.3.0)
14
+ actionpack (3.1.1)
15
+ activemodel (= 3.1.1)
16
+ activesupport (= 3.1.1)
17
+ builder (~> 3.0.0)
18
+ erubis (~> 2.7.0)
19
+ i18n (~> 0.6)
20
+ rack (~> 1.3.2)
21
+ rack-cache (~> 1.1)
22
+ rack-mount (~> 0.8.2)
23
+ rack-test (~> 0.6.1)
24
+ sprockets (~> 2.0.2)
25
+ activemodel (3.1.1)
26
+ activesupport (= 3.1.1)
27
+ builder (~> 3.0.0)
28
+ i18n (~> 0.6)
29
+ activerecord (3.1.1)
30
+ activemodel (= 3.1.1)
31
+ activesupport (= 3.1.1)
32
+ arel (~> 2.2.1)
33
+ tzinfo (~> 0.3.29)
34
+ activeresource (3.1.1)
35
+ activemodel (= 3.1.1)
36
+ activesupport (= 3.1.1)
37
+ activesupport (3.1.1)
38
+ multi_json (~> 1.0)
39
+ addressable (2.2.6)
40
+ appraisal (0.4.0)
41
+ bundler
42
+ rake
43
+ arel (2.2.1)
44
+ aruba (0.3.7)
45
+ childprocess (>= 0.1.9)
46
+ cucumber (>= 0.10.5)
47
+ rspec (>= 2.6.0)
48
+ bourne (1.0)
49
+ mocha (= 0.9.8)
50
+ builder (3.0.0)
51
+ childprocess (0.2.2)
52
+ ffi (~> 1.0.6)
53
+ coffee-rails (3.1.1)
54
+ coffee-script (>= 2.2.0)
55
+ railties (~> 3.1.0)
56
+ coffee-script (2.2.0)
57
+ coffee-script-source
58
+ execjs
59
+ coffee-script-source (1.1.3)
60
+ crack (0.3.1)
61
+ cucumber (0.10.7)
62
+ builder (>= 2.1.2)
63
+ diff-lcs (>= 1.1.2)
64
+ gherkin (~> 2.4.0)
65
+ json (>= 1.4.6)
66
+ term-ansicolor (>= 1.0.5)
67
+ daemons (1.1.4)
68
+ diff-lcs (1.1.3)
69
+ erubis (2.7.0)
70
+ eventmachine (0.12.10)
71
+ execjs (1.2.9)
72
+ multi_json (~> 1.0)
73
+ ffi (1.0.11)
74
+ gherkin (2.4.21)
75
+ json (>= 1.4.6)
76
+ hike (1.2.1)
77
+ i18n (0.6.0)
78
+ jquery-rails (1.0.17)
79
+ railties (~> 3.0)
80
+ thor (~> 0.14)
81
+ json (1.6.1)
82
+ mail (2.3.0)
83
+ i18n (>= 0.4.0)
84
+ mime-types (~> 1.16)
85
+ treetop (~> 1.4.8)
86
+ mime-types (1.17.2)
87
+ mocha (0.9.8)
88
+ rake
89
+ multi_json (1.0.3)
90
+ polyglot (0.3.3)
91
+ rack (1.3.5)
92
+ rack-cache (1.1)
93
+ rack (>= 0.4)
94
+ rack-mount (0.8.3)
95
+ rack (>= 1.0.0)
96
+ rack-protection (1.1.4)
97
+ rack
98
+ rack-ssl (1.3.2)
99
+ rack
100
+ rack-test (0.6.1)
101
+ rack (>= 1.0)
102
+ rails (3.1.1)
103
+ actionmailer (= 3.1.1)
104
+ actionpack (= 3.1.1)
105
+ activerecord (= 3.1.1)
106
+ activeresource (= 3.1.1)
107
+ activesupport (= 3.1.1)
108
+ bundler (~> 1.0)
109
+ railties (= 3.1.1)
110
+ railties (3.1.1)
111
+ actionpack (= 3.1.1)
112
+ activesupport (= 3.1.1)
113
+ rack-ssl (~> 1.3.2)
114
+ rake (>= 0.8.7)
115
+ rdoc (~> 3.4)
116
+ thor (~> 0.14.6)
117
+ rake (0.9.2)
118
+ rdoc (3.11)
119
+ json (~> 1.4)
120
+ rspec (2.7.0)
121
+ rspec-core (~> 2.7.0)
122
+ rspec-expectations (~> 2.7.0)
123
+ rspec-mocks (~> 2.7.0)
124
+ rspec-core (2.7.1)
125
+ rspec-expectations (2.7.0)
126
+ diff-lcs (~> 1.1.2)
127
+ rspec-mocks (2.7.0)
128
+ sass (3.1.10)
129
+ sass-rails (3.1.4)
130
+ actionpack (~> 3.1.0)
131
+ railties (~> 3.1.0)
132
+ sass (>= 3.1.4)
133
+ sprockets (~> 2.0.0)
134
+ tilt (~> 1.3.2)
135
+ sham_rack (1.3.3)
136
+ rack
137
+ sinatra (1.3.1)
138
+ rack (~> 1.3, >= 1.3.4)
139
+ rack-protection (~> 1.1, >= 1.1.2)
140
+ tilt (~> 1.3, >= 1.3.3)
141
+ sprockets (2.0.3)
142
+ hike (~> 1.2)
143
+ rack (~> 1.0)
144
+ tilt (~> 1.1, != 1.3.0)
145
+ sqlite3 (1.3.4)
146
+ sqlite3-ruby (1.3.3)
147
+ sqlite3 (>= 1.3.3)
148
+ term-ansicolor (1.0.7)
149
+ thin (1.3.1)
150
+ daemons (>= 1.0.9)
151
+ eventmachine (>= 0.12.6)
152
+ rack (>= 1.0.0)
153
+ thor (0.14.6)
154
+ tilt (1.3.3)
155
+ treetop (1.4.10)
156
+ polyglot
157
+ polyglot (>= 0.3.1)
158
+ tzinfo (0.3.31)
159
+ uglifier (1.0.4)
160
+ execjs (>= 0.3.0)
161
+ multi_json (>= 1.0.2)
162
+ webmock (1.7.7)
163
+ addressable (~> 2.2, > 2.2.5)
164
+ crack (>= 0.1.7)
165
+ yard (0.7.3)
166
+
167
+ PLATFORMS
168
+ ruby
169
+
170
+ DEPENDENCIES
171
+ appraisal (~> 0.4)
172
+ aruba (~> 0.3.2)
173
+ bourne
174
+ coffee-rails
175
+ copycopter_client!
176
+ cucumber (~> 0.10.0)
177
+ i18n
178
+ jquery-rails
179
+ rails (~> 3.1.0)
180
+ rake (= 0.9.2)
181
+ rspec (~> 2.3)
182
+ sass-rails
183
+ sham_rack
184
+ sinatra
185
+ sqlite3-ruby
186
+ thin
187
+ uglifier
188
+ webmock
189
+ yard
@@ -14,10 +14,15 @@ module CopycopterClient
14
14
  # Invokes the upstream Rack application and flushes the cache after each
15
15
  # request.
16
16
  def call(env)
17
- @cache.download
17
+ @cache.download unless asset_request?(env)
18
18
  response = @app.call(env)
19
- @cache.flush
19
+ @cache.flush unless asset_request?(env)
20
20
  response
21
21
  end
22
+
23
+ private
24
+ def asset_request?(env)
25
+ env['PATH_INFO'] =~ /^\/assets/
26
+ end
22
27
  end
23
28
  end
@@ -1,6 +1,6 @@
1
1
  module CopycopterClient
2
2
  # Client version
3
- VERSION = "1.1.1"
3
+ VERSION = "1.1.2"
4
4
 
5
5
  # API version being used to communicate with the server
6
6
  API_VERSION = "2.0".freeze
@@ -44,7 +44,7 @@ describe CopycopterClient do
44
44
  project = add_project
45
45
  client = build_client(:api_key => project.api_key, :secure => true)
46
46
  client.download { |ignore| }
47
- http.use_ssl.should == true
47
+ http.use_ssl?.should == true
48
48
  http.verify_mode.should == OpenSSL::SSL::VERIFY_PEER
49
49
  http.ca_file.should == CopycopterClient::Configuration::CA_FILE
50
50
  end
@@ -53,7 +53,7 @@ describe CopycopterClient do
53
53
  project = add_project
54
54
  client = build_client(:api_key => project.api_key, :secure => false)
55
55
  client.download { |ignore| }
56
- http.use_ssl.should == false
56
+ http.use_ssl?.should == false
57
57
  end
58
58
 
59
59
  it "wraps HTTP errors with ConnectionError" do
@@ -25,3 +25,23 @@ describe CopycopterClient::RequestSync do
25
25
  cache.should have_received(:download)
26
26
  end
27
27
  end
28
+
29
+ describe CopycopterClient::RequestSync, 'serving assets' do
30
+ let(:env) do
31
+ { "PATH_INFO" => '/assets/choper.png' }
32
+ end
33
+ let(:cache) { {} }
34
+ let(:response) { 'response' }
35
+ let(:app) { stub('app', :call => response) }
36
+ before { cache.stubs(:flush => nil, :download => nil) }
37
+ subject { CopycopterClient::RequestSync.new(app, :cache => cache) }
38
+
39
+ it "does not flush defaults" do
40
+ subject.call(env)
41
+ cache.should_not have_received(:flush)
42
+ end
43
+ it "does not download new copy" do
44
+ subject.call(env)
45
+ cache.should_not have_received(:download)
46
+ end
47
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: copycopter_client
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 1
10
- version: 1.1.1
9
+ - 2
10
+ version: 1.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - thoughtbot
@@ -15,11 +15,12 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-16 00:00:00 -04:00
18
+ date: 2011-11-14 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- type: :runtime
22
+ name: i18n
23
+ prerelease: false
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
24
25
  none: false
25
26
  requirements:
@@ -31,11 +32,11 @@ dependencies:
31
32
  - 5
32
33
  - 0
33
34
  version: 0.5.0
35
+ type: :runtime
34
36
  version_requirements: *id001
35
- name: i18n
36
- prerelease: false
37
37
  - !ruby/object:Gem::Dependency
38
- type: :runtime
38
+ name: json
39
+ prerelease: false
39
40
  requirement: &id002 !ruby/object:Gem::Requirement
40
41
  none: false
41
42
  requirements:
@@ -45,9 +46,214 @@ dependencies:
45
46
  segments:
46
47
  - 0
47
48
  version: "0"
49
+ type: :runtime
48
50
  version_requirements: *id002
49
- name: json
51
+ - !ruby/object:Gem::Dependency
52
+ name: rails
53
+ prerelease: false
54
+ requirement: &id003 !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ~>
58
+ - !ruby/object:Gem::Version
59
+ hash: 3
60
+ segments:
61
+ - 3
62
+ - 1
63
+ - 0
64
+ version: 3.1.0
65
+ type: :development
66
+ version_requirements: *id003
67
+ - !ruby/object:Gem::Dependency
68
+ name: sqlite3-ruby
69
+ prerelease: false
70
+ requirement: &id004 !ruby/object:Gem::Requirement
71
+ none: false
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ hash: 3
76
+ segments:
77
+ - 0
78
+ version: "0"
79
+ type: :development
80
+ version_requirements: *id004
81
+ - !ruby/object:Gem::Dependency
82
+ name: rspec
83
+ prerelease: false
84
+ requirement: &id005 !ruby/object:Gem::Requirement
85
+ none: false
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ hash: 5
90
+ segments:
91
+ - 2
92
+ - 3
93
+ version: "2.3"
94
+ type: :development
95
+ version_requirements: *id005
96
+ - !ruby/object:Gem::Dependency
97
+ name: bourne
98
+ prerelease: false
99
+ requirement: &id006 !ruby/object:Gem::Requirement
100
+ none: false
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ hash: 3
105
+ segments:
106
+ - 0
107
+ version: "0"
108
+ type: :development
109
+ version_requirements: *id006
110
+ - !ruby/object:Gem::Dependency
111
+ name: webmock
112
+ prerelease: false
113
+ requirement: &id007 !ruby/object:Gem::Requirement
114
+ none: false
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ hash: 3
119
+ segments:
120
+ - 0
121
+ version: "0"
122
+ type: :development
123
+ version_requirements: *id007
124
+ - !ruby/object:Gem::Dependency
125
+ name: rake
50
126
  prerelease: false
127
+ requirement: &id008 !ruby/object:Gem::Requirement
128
+ none: false
129
+ requirements:
130
+ - - "="
131
+ - !ruby/object:Gem::Version
132
+ hash: 63
133
+ segments:
134
+ - 0
135
+ - 9
136
+ - 2
137
+ version: 0.9.2
138
+ type: :development
139
+ version_requirements: *id008
140
+ - !ruby/object:Gem::Dependency
141
+ name: sham_rack
142
+ prerelease: false
143
+ requirement: &id009 !ruby/object:Gem::Requirement
144
+ none: false
145
+ requirements:
146
+ - - ">="
147
+ - !ruby/object:Gem::Version
148
+ hash: 3
149
+ segments:
150
+ - 0
151
+ version: "0"
152
+ type: :development
153
+ version_requirements: *id009
154
+ - !ruby/object:Gem::Dependency
155
+ name: cucumber
156
+ prerelease: false
157
+ requirement: &id010 !ruby/object:Gem::Requirement
158
+ none: false
159
+ requirements:
160
+ - - ~>
161
+ - !ruby/object:Gem::Version
162
+ hash: 55
163
+ segments:
164
+ - 0
165
+ - 10
166
+ - 0
167
+ version: 0.10.0
168
+ type: :development
169
+ version_requirements: *id010
170
+ - !ruby/object:Gem::Dependency
171
+ name: aruba
172
+ prerelease: false
173
+ requirement: &id011 !ruby/object:Gem::Requirement
174
+ none: false
175
+ requirements:
176
+ - - ~>
177
+ - !ruby/object:Gem::Version
178
+ hash: 23
179
+ segments:
180
+ - 0
181
+ - 3
182
+ - 2
183
+ version: 0.3.2
184
+ type: :development
185
+ version_requirements: *id011
186
+ - !ruby/object:Gem::Dependency
187
+ name: sinatra
188
+ prerelease: false
189
+ requirement: &id012 !ruby/object:Gem::Requirement
190
+ none: false
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ hash: 3
195
+ segments:
196
+ - 0
197
+ version: "0"
198
+ type: :development
199
+ version_requirements: *id012
200
+ - !ruby/object:Gem::Dependency
201
+ name: yard
202
+ prerelease: false
203
+ requirement: &id013 !ruby/object:Gem::Requirement
204
+ none: false
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ hash: 3
209
+ segments:
210
+ - 0
211
+ version: "0"
212
+ type: :development
213
+ version_requirements: *id013
214
+ - !ruby/object:Gem::Dependency
215
+ name: thin
216
+ prerelease: false
217
+ requirement: &id014 !ruby/object:Gem::Requirement
218
+ none: false
219
+ requirements:
220
+ - - ">="
221
+ - !ruby/object:Gem::Version
222
+ hash: 3
223
+ segments:
224
+ - 0
225
+ version: "0"
226
+ type: :development
227
+ version_requirements: *id014
228
+ - !ruby/object:Gem::Dependency
229
+ name: i18n
230
+ prerelease: false
231
+ requirement: &id015 !ruby/object:Gem::Requirement
232
+ none: false
233
+ requirements:
234
+ - - ">="
235
+ - !ruby/object:Gem::Version
236
+ hash: 3
237
+ segments:
238
+ - 0
239
+ version: "0"
240
+ type: :development
241
+ version_requirements: *id015
242
+ - !ruby/object:Gem::Dependency
243
+ name: appraisal
244
+ prerelease: false
245
+ requirement: &id016 !ruby/object:Gem::Requirement
246
+ none: false
247
+ requirements:
248
+ - - ~>
249
+ - !ruby/object:Gem::Version
250
+ hash: 3
251
+ segments:
252
+ - 0
253
+ - 4
254
+ version: "0.4"
255
+ type: :development
256
+ version_requirements: *id016
51
257
  description:
52
258
  email: support@thoughtbot.com
53
259
  executables: []
@@ -57,11 +263,31 @@ extensions: []
57
263
  extra_rdoc_files: []
58
264
 
59
265
  files:
60
- - README.md
266
+ - .bundle/config
267
+ - .gitignore
268
+ - .rspec
269
+ - AddTrustExternalCARoot.crt
270
+ - Appraisals
271
+ - CONTRIBUTING.md
272
+ - Gemfile
273
+ - Gemfile.lock
61
274
  - MIT-LICENSE
275
+ - README.md
62
276
  - Rakefile
277
+ - copycopter_client.gemspec
278
+ - features/rails.feature
279
+ - features/step_definitions/copycopter_server_steps.rb
280
+ - features/step_definitions/rails_steps.rb
281
+ - features/support/env.rb
282
+ - features/support/rails_server.rb
283
+ - gemfiles/2.3.gemfile
284
+ - gemfiles/2.3.gemfile.lock
285
+ - gemfiles/3.0.gemfile
286
+ - gemfiles/3.0.gemfile.lock
287
+ - gemfiles/3.1.gemfile
288
+ - gemfiles/3.1.gemfile.lock
63
289
  - init.rb
64
- - AddTrustExternalCARoot.crt
290
+ - lib/copycopter_client.rb
65
291
  - lib/copycopter_client/cache.rb
66
292
  - lib/copycopter_client/client.rb
67
293
  - lib/copycopter_client/configuration.rb
@@ -74,7 +300,6 @@ files:
74
300
  - lib/copycopter_client/railtie.rb
75
301
  - lib/copycopter_client/request_sync.rb
76
302
  - lib/copycopter_client/version.rb
77
- - lib/copycopter_client.rb
78
303
  - lib/tasks/copycopter_client_tasks.rake
79
304
  - spec/copycopter_client/cache_spec.rb
80
305
  - spec/copycopter_client/client_spec.rb
@@ -97,11 +322,7 @@ files:
97
322
  - spec/support/fake_unicorn.rb
98
323
  - spec/support/middleware_stack.rb
99
324
  - spec/support/writing_cache.rb
100
- - features/rails.feature
101
- - features/step_definitions/copycopter_server_steps.rb
102
- - features/step_definitions/rails_steps.rb
103
- - features/support/env.rb
104
- - features/support/rails_server.rb
325
+ - tmp/projects.json
105
326
  has_rdoc: true
106
327
  homepage: http://github.com/thoughtbot/copycopter_client
107
328
  licenses: []
@@ -131,10 +352,35 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
352
  version: "0"
132
353
  requirements: []
133
354
 
134
- rubyforge_project: copycopter_client
135
- rubygems_version: 1.6.1
355
+ rubyforge_project:
356
+ rubygems_version: 1.6.2
136
357
  signing_key:
137
358
  specification_version: 3
138
359
  summary: Client for the Copycopter content management service
139
- test_files: []
140
-
360
+ test_files:
361
+ - features/rails.feature
362
+ - features/step_definitions/copycopter_server_steps.rb
363
+ - features/step_definitions/rails_steps.rb
364
+ - features/support/env.rb
365
+ - features/support/rails_server.rb
366
+ - spec/copycopter_client/cache_spec.rb
367
+ - spec/copycopter_client/client_spec.rb
368
+ - spec/copycopter_client/configuration_spec.rb
369
+ - spec/copycopter_client/i18n_backend_spec.rb
370
+ - spec/copycopter_client/poller_spec.rb
371
+ - spec/copycopter_client/prefixed_logger_spec.rb
372
+ - spec/copycopter_client/process_guard_spec.rb
373
+ - spec/copycopter_client/request_sync_spec.rb
374
+ - spec/copycopter_client_spec.rb
375
+ - spec/spec_helper.rb
376
+ - spec/support/client_spec_helpers.rb
377
+ - spec/support/defines_constants.rb
378
+ - spec/support/fake_client.rb
379
+ - spec/support/fake_copycopter_app.rb
380
+ - spec/support/fake_html_safe_string.rb
381
+ - spec/support/fake_logger.rb
382
+ - spec/support/fake_passenger.rb
383
+ - spec/support/fake_resque_job.rb
384
+ - spec/support/fake_unicorn.rb
385
+ - spec/support/middleware_stack.rb
386
+ - spec/support/writing_cache.rb