cone 0.0.6 → 0.1.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4ff183256fcd8d4a4378b3903e29e082fa571f0e
4
- data.tar.gz: 6b9f711e3a37403493328b52550410977bdbc934
3
+ metadata.gz: 4f3ecb3a178ffc78d09101d167c0338db456c3c8
4
+ data.tar.gz: b8734f2c8fe6f9c50581c35e773133181028cad2
5
5
  SHA512:
6
- metadata.gz: e9fc8ddbb249d94fb028011cbb48f938c5583cde4053b316440ca09a010f752a05816919cef3259f053a635a3aed106d7f3a3f619416d0bf0a97f5ae2930feca
7
- data.tar.gz: 76dce6ebb8674912435586276150dddcfd2f62e75d33dcc367a0010eb94eda01f7037e813e8c028e7011489e79155f0df007b563e8d6ff7f3eb78d3aaba7f665
6
+ metadata.gz: ebc648ceb2d5d28780be2a189922ac2e01cc05ea80fe909e8b093277622c553d43db02074ed06ed9d18845b3f2b3de6ece20bcf2ce1574ead0dbf3e3e58e6eba
7
+ data.tar.gz: 7d09575d924b4b3e1a21830eb110988a1338676aab1a77f3664a6cc4ccbfb73b5198a1f592d6315043ee98bdb30b346cb57cd2ed8f6d72e18b4e6fb798bbea5c
data/cone.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'cone'
3
- gem.version = '0.0.6'
3
+ gem.version = '0.1.0'
4
4
  gem.summary = 'Rails client side URL helpers'
5
5
  gem.author = 'Lihan Li'
6
6
  gem.email = 'frankieteardrop@gmail.com'
@@ -11,4 +11,4 @@ Gem::Specification.new do |gem|
11
11
  gem.files = `git ls-files`.split("\n")
12
12
  gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
13
13
  gem.require_paths = ["lib"]
14
- end
14
+ end
data/lib/cone.rb CHANGED
@@ -3,7 +3,7 @@ module Cone
3
3
  class Railtie < ::Rails::Railtie
4
4
  config.before_initialize do
5
5
  # clear the assets cache otherwise routes don't get reloaded on server restart
6
- assets_cache = ::Rails.application.config.instance_eval { @assets }[:cache_store][1]
6
+ assets_cache = 'tmp/cache/assets'
7
7
  ActiveSupport::Cache::FileStore.new(assets_cache).clear if File.directory?(assets_cache)
8
8
  end
9
9
  end
data/test/Gemfile CHANGED
@@ -1,11 +1,12 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'rails', '4.0.0'
3
+ gem 'rails', '4.2.6'
4
4
  gem 'cone', path: '..'
5
5
 
6
6
  group :development, :test do
7
7
  gem 'thin'
8
8
  gem 'pry-rails'
9
- gem 'capybara', '2.0.2'
10
- gem 'turn', '0.9.6'
9
+ gem 'capybara', '2.2.1'
10
+ gem 'selenium-webdriver', '2.53.0'
11
+ gem 'minitest-reporters', '1.0.8'
11
12
  end
data/test/Gemfile.lock CHANGED
@@ -1,140 +1,164 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- cone (0.0.6)
4
+ cone (0.1.0)
5
5
  coffee-rails
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- actionmailer (4.0.0)
11
- actionpack (= 4.0.0)
12
- mail (~> 2.5.3)
13
- actionpack (4.0.0)
14
- activesupport (= 4.0.0)
15
- builder (~> 3.1.0)
16
- erubis (~> 2.7.0)
17
- rack (~> 1.5.2)
10
+ actionmailer (4.2.6)
11
+ actionpack (= 4.2.6)
12
+ actionview (= 4.2.6)
13
+ activejob (= 4.2.6)
14
+ mail (~> 2.5, >= 2.5.4)
15
+ rails-dom-testing (~> 1.0, >= 1.0.5)
16
+ actionpack (4.2.6)
17
+ actionview (= 4.2.6)
18
+ activesupport (= 4.2.6)
19
+ rack (~> 1.6)
18
20
  rack-test (~> 0.6.2)
19
- activemodel (4.0.0)
20
- activesupport (= 4.0.0)
21
- builder (~> 3.1.0)
22
- activerecord (4.0.0)
23
- activemodel (= 4.0.0)
24
- activerecord-deprecated_finders (~> 1.0.2)
25
- activesupport (= 4.0.0)
26
- arel (~> 4.0.0)
27
- activerecord-deprecated_finders (1.0.3)
28
- activesupport (4.0.0)
29
- i18n (~> 0.6, >= 0.6.4)
30
- minitest (~> 4.2)
31
- multi_json (~> 1.3)
32
- thread_safe (~> 0.1)
33
- tzinfo (~> 0.3.37)
34
- ansi (1.4.3)
35
- arel (4.0.0)
36
- atomic (1.1.9)
37
- builder (3.1.4)
38
- capybara (2.0.2)
21
+ rails-dom-testing (~> 1.0, >= 1.0.5)
22
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
23
+ actionview (4.2.6)
24
+ activesupport (= 4.2.6)
25
+ builder (~> 3.1)
26
+ erubis (~> 2.7.0)
27
+ rails-dom-testing (~> 1.0, >= 1.0.5)
28
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
29
+ activejob (4.2.6)
30
+ activesupport (= 4.2.6)
31
+ globalid (>= 0.3.0)
32
+ activemodel (4.2.6)
33
+ activesupport (= 4.2.6)
34
+ builder (~> 3.1)
35
+ activerecord (4.2.6)
36
+ activemodel (= 4.2.6)
37
+ activesupport (= 4.2.6)
38
+ arel (~> 6.0)
39
+ activesupport (4.2.6)
40
+ i18n (~> 0.7)
41
+ json (~> 1.7, >= 1.7.7)
42
+ minitest (~> 5.1)
43
+ thread_safe (~> 0.3, >= 0.3.4)
44
+ tzinfo (~> 1.1)
45
+ ansi (1.5.0)
46
+ arel (6.0.3)
47
+ builder (3.2.2)
48
+ capybara (2.2.1)
39
49
  mime-types (>= 1.16)
40
50
  nokogiri (>= 1.3.3)
41
51
  rack (>= 1.0.0)
42
52
  rack-test (>= 0.5.4)
43
- selenium-webdriver (~> 2.0)
44
- xpath (~> 1.0.0)
45
- childprocess (0.3.9)
53
+ xpath (~> 2.0)
54
+ childprocess (0.5.9)
46
55
  ffi (~> 1.0, >= 1.0.11)
47
- coderay (1.0.9)
48
- coffee-rails (4.0.0)
56
+ coderay (1.1.1)
57
+ coffee-rails (4.1.1)
49
58
  coffee-script (>= 2.2.0)
50
- railties (>= 4.0.0.beta, < 5.0)
51
- coffee-script (2.2.0)
59
+ railties (>= 4.0.0, < 5.1.x)
60
+ coffee-script (2.4.1)
52
61
  coffee-script-source
53
62
  execjs
54
- coffee-script-source (1.6.2)
55
- daemons (1.1.9)
63
+ coffee-script-source (1.10.0)
64
+ concurrent-ruby (1.0.2)
65
+ daemons (1.2.3)
56
66
  erubis (2.7.0)
57
- eventmachine (1.0.3)
58
- execjs (1.4.0)
59
- multi_json (~> 1.0)
60
- ffi (1.9.0)
61
- hike (1.2.3)
62
- i18n (0.6.4)
63
- mail (2.5.4)
64
- mime-types (~> 1.16)
65
- treetop (~> 1.4.8)
66
- method_source (0.8.1)
67
- mime-types (1.23)
68
- mini_portile (0.5.0)
69
- minitest (4.7.5)
70
- multi_json (1.7.7)
71
- nokogiri (1.6.0)
72
- mini_portile (~> 0.5.0)
73
- polyglot (0.3.3)
74
- pry (0.9.12.2)
75
- coderay (~> 1.0.5)
76
- method_source (~> 0.8)
67
+ eventmachine (1.2.0.1)
68
+ execjs (2.6.0)
69
+ ffi (1.9.10)
70
+ globalid (0.3.6)
71
+ activesupport (>= 4.1.0)
72
+ i18n (0.7.0)
73
+ json (1.8.3)
74
+ loofah (2.0.3)
75
+ nokogiri (>= 1.5.9)
76
+ mail (2.6.4)
77
+ mime-types (>= 1.16, < 4)
78
+ method_source (0.8.2)
79
+ mime-types (3.0)
80
+ mime-types-data (~> 3.2015)
81
+ mime-types-data (3.2016.0221)
82
+ mini_portile2 (2.0.0)
83
+ minitest (5.9.0)
84
+ minitest-reporters (1.0.8)
85
+ ansi
86
+ builder
87
+ minitest (>= 5.0)
88
+ ruby-progressbar
89
+ nokogiri (1.6.7.2)
90
+ mini_portile2 (~> 2.0.0.rc2)
91
+ pry (0.10.3)
92
+ coderay (~> 1.1.0)
93
+ method_source (~> 0.8.1)
77
94
  slop (~> 3.4)
78
- pry-rails (0.3.1)
95
+ pry-rails (0.3.4)
79
96
  pry (>= 0.9.10)
80
- rack (1.5.2)
81
- rack-test (0.6.2)
97
+ rack (1.6.4)
98
+ rack-test (0.6.3)
82
99
  rack (>= 1.0)
83
- rails (4.0.0)
84
- actionmailer (= 4.0.0)
85
- actionpack (= 4.0.0)
86
- activerecord (= 4.0.0)
87
- activesupport (= 4.0.0)
100
+ rails (4.2.6)
101
+ actionmailer (= 4.2.6)
102
+ actionpack (= 4.2.6)
103
+ actionview (= 4.2.6)
104
+ activejob (= 4.2.6)
105
+ activemodel (= 4.2.6)
106
+ activerecord (= 4.2.6)
107
+ activesupport (= 4.2.6)
88
108
  bundler (>= 1.3.0, < 2.0)
89
- railties (= 4.0.0)
90
- sprockets-rails (~> 2.0.0)
91
- railties (4.0.0)
92
- actionpack (= 4.0.0)
93
- activesupport (= 4.0.0)
109
+ railties (= 4.2.6)
110
+ sprockets-rails
111
+ rails-deprecated_sanitizer (1.0.3)
112
+ activesupport (>= 4.2.0.alpha)
113
+ rails-dom-testing (1.0.7)
114
+ activesupport (>= 4.2.0.beta, < 5.0)
115
+ nokogiri (~> 1.6.0)
116
+ rails-deprecated_sanitizer (>= 1.0.1)
117
+ rails-html-sanitizer (1.0.3)
118
+ loofah (~> 2.0)
119
+ railties (4.2.6)
120
+ actionpack (= 4.2.6)
121
+ activesupport (= 4.2.6)
94
122
  rake (>= 0.8.7)
95
123
  thor (>= 0.18.1, < 2.0)
96
- rake (10.1.0)
97
- rubyzip (0.9.9)
98
- selenium-webdriver (2.33.0)
99
- childprocess (>= 0.2.5)
100
- multi_json (~> 1.0)
101
- rubyzip
102
- websocket (~> 1.0.4)
103
- slop (3.4.5)
104
- sprockets (2.10.0)
105
- hike (~> 1.2)
106
- multi_json (~> 1.0)
124
+ rake (11.1.2)
125
+ ruby-progressbar (1.8.1)
126
+ rubyzip (1.2.0)
127
+ selenium-webdriver (2.53.0)
128
+ childprocess (~> 0.5)
129
+ rubyzip (~> 1.0)
130
+ websocket (~> 1.0)
131
+ slop (3.6.0)
132
+ sprockets (3.6.0)
133
+ concurrent-ruby (~> 1.0)
134
+ rack (> 1, < 3)
135
+ sprockets-rails (3.0.4)
136
+ actionpack (>= 4.0)
137
+ activesupport (>= 4.0)
138
+ sprockets (>= 3.0.0)
139
+ thin (1.6.4)
140
+ daemons (~> 1.0, >= 1.0.9)
141
+ eventmachine (~> 1.0, >= 1.0.4)
107
142
  rack (~> 1.0)
108
- tilt (~> 1.1, != 1.3.0)
109
- sprockets-rails (2.0.0)
110
- actionpack (>= 3.0)
111
- activesupport (>= 3.0)
112
- sprockets (~> 2.8)
113
- thin (1.5.1)
114
- daemons (>= 1.0.9)
115
- eventmachine (>= 0.12.6)
116
- rack (>= 1.0.0)
117
- thor (0.18.1)
118
- thread_safe (0.1.0)
119
- atomic
120
- tilt (1.4.1)
121
- treetop (1.4.14)
122
- polyglot
123
- polyglot (>= 0.3.1)
124
- turn (0.9.6)
125
- ansi
126
- tzinfo (0.3.37)
127
- websocket (1.0.7)
128
- xpath (1.0.0)
143
+ thor (0.19.1)
144
+ thread_safe (0.3.5)
145
+ tzinfo (1.2.2)
146
+ thread_safe (~> 0.1)
147
+ websocket (1.2.3)
148
+ xpath (2.0.0)
129
149
  nokogiri (~> 1.3)
130
150
 
131
151
  PLATFORMS
132
152
  ruby
133
153
 
134
154
  DEPENDENCIES
135
- capybara (= 2.0.2)
155
+ capybara (= 2.2.1)
136
156
  cone!
157
+ minitest-reporters (= 1.0.8)
137
158
  pry-rails
138
- rails (= 4.0.0)
159
+ rails (= 4.2.6)
160
+ selenium-webdriver (= 2.53.0)
139
161
  thin
140
- turn (= 0.9.6)
162
+
163
+ BUNDLED WITH
164
+ 1.10.6
@@ -28,4 +28,6 @@ ConeTest::Application.configure do
28
28
 
29
29
  # Expands the lines which load the assets
30
30
  config.assets.debug = true
31
+
32
+ config.eager_load = false
31
33
  end
@@ -9,7 +9,7 @@ ConeTest::Application.configure do
9
9
  config.action_controller.perform_caching = true
10
10
 
11
11
  # Disable Rails's static asset server (Apache or nginx will already do this)
12
- config.serve_static_assets = false
12
+ config.serve_static_files = false
13
13
 
14
14
  # Compress JavaScripts and CSS
15
15
  config.assets.compress = true
@@ -1,4 +1,5 @@
1
1
  ConeTest::Application.configure do
2
+ config.active_support.test_order = :sorted
2
3
  # Settings specified here will take precedence over those in config/application.rb
3
4
 
4
5
  # The test environment is used exclusively to run your application's
@@ -8,7 +9,7 @@ ConeTest::Application.configure do
8
9
  config.cache_classes = true
9
10
 
10
11
  # Configure static asset server for tests with Cache-Control for performance
11
- config.serve_static_assets = true
12
+ config.serve_static_files = true
12
13
  config.static_cache_control = "public, max-age=3600"
13
14
 
14
15
  # Show full error reports and disable caching
@@ -29,4 +30,6 @@ ConeTest::Application.configure do
29
30
 
30
31
  # Print deprecation notices to the stderr
31
32
  config.active_support.deprecation = :stderr
33
+
34
+ config.eager_load = false
32
35
  end
@@ -1,6 +1,11 @@
1
1
  require 'test_helper'
2
2
 
3
3
  class ConeGemTest < ActionDispatch::IntegrationTest
4
+ def setup
5
+ assert(Dir["#{::Rails.application.config.instance_eval { @assets }[:cache_store][1]}*"].blank?) if Capybara::Server.ports.blank?
6
+
7
+ super
8
+ end
4
9
 
5
10
  def get_cone_url(name, opt = {})
6
11
  # alias, params
@@ -2,7 +2,9 @@ ENV["RAILS_ENV"] = "test"
2
2
  require File.expand_path('../../config/environment', __FILE__)
3
3
  require 'rails/test_help'
4
4
  require 'capybara/rails'
5
- require 'turn'
5
+ require "minitest/reporters"
6
+
7
+ Minitest::Reporters.use!(Minitest::Reporters::SpecReporter.new)
6
8
 
7
9
  class ActiveSupport::TestCase
8
10
  # Add more helper methods to be used by all tests here...
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lihan Li
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-25 00:00:00.000000000 Z
11
+ date: 2016-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coffee-rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  description:
@@ -30,7 +30,7 @@ executables: []
30
30
  extensions: []
31
31
  extra_rdoc_files: []
32
32
  files:
33
- - .gitignore
33
+ - ".gitignore"
34
34
  - MIT-LICENSE
35
35
  - README.md
36
36
  - Rakefile
@@ -82,10 +82,8 @@ files:
82
82
  - test/test/functional/.gitkeep
83
83
  - test/test/integration/.gitkeep
84
84
  - test/test/integration/cone_gem_test.rb
85
- - test/test/performance/browsing_test.rb
86
85
  - test/test/test_helper.rb
87
86
  - test/test/unit/.gitkeep
88
- - test/test/unit/cone_init_test.rb
89
87
  - test/vendor/assets/javascripts/.gitkeep
90
88
  - test/vendor/assets/stylesheets/.gitkeep
91
89
  - test/vendor/plugins/.gitkeep
@@ -98,69 +96,18 @@ require_paths:
98
96
  - lib
99
97
  required_ruby_version: !ruby/object:Gem::Requirement
100
98
  requirements:
101
- - - '>='
99
+ - - ">="
102
100
  - !ruby/object:Gem::Version
103
101
  version: '0'
104
102
  required_rubygems_version: !ruby/object:Gem::Requirement
105
103
  requirements:
106
- - - '>='
104
+ - - ">="
107
105
  - !ruby/object:Gem::Version
108
106
  version: '0'
109
107
  requirements: []
110
108
  rubyforge_project:
111
- rubygems_version: 2.0.0
109
+ rubygems_version: 2.4.5.1
112
110
  signing_key:
113
111
  specification_version: 4
114
112
  summary: Rails client side URL helpers
115
- test_files:
116
- - test/Gemfile
117
- - test/Gemfile.lock
118
- - test/README.rdoc
119
- - test/Rakefile
120
- - test/app/assets/images/rails.png
121
- - test/app/assets/javascripts/application.js
122
- - test/app/assets/stylesheets/application.css
123
- - test/app/controllers/application_controller.rb
124
- - test/app/controllers/users_controller.rb
125
- - test/app/helpers/application_helper.rb
126
- - test/app/mailers/.gitkeep
127
- - test/app/models/.gitkeep
128
- - test/app/views/layouts/application.html.erb
129
- - test/app/views/users/index.html.erb
130
- - test/config.ru
131
- - test/config/application.rb
132
- - test/config/boot.rb
133
- - test/config/environment.rb
134
- - test/config/environments/development.rb
135
- - test/config/environments/production.rb
136
- - test/config/environments/test.rb
137
- - test/config/initializers/backtrace_silencers.rb
138
- - test/config/initializers/inflections.rb
139
- - test/config/initializers/mime_types.rb
140
- - test/config/initializers/secret_token.rb
141
- - test/config/initializers/session_store.rb
142
- - test/config/initializers/wrap_parameters.rb
143
- - test/config/locales/en.yml
144
- - test/config/routes.rb
145
- - test/db/seeds.rb
146
- - test/doc/README_FOR_APP
147
- - test/lib/assets/.gitkeep
148
- - test/lib/tasks/.gitkeep
149
- - test/log/.gitkeep
150
- - test/public/404.html
151
- - test/public/422.html
152
- - test/public/500.html
153
- - test/public/favicon.ico
154
- - test/public/robots.txt
155
- - test/script/rails
156
- - test/test/fixtures/.gitkeep
157
- - test/test/functional/.gitkeep
158
- - test/test/integration/.gitkeep
159
- - test/test/integration/cone_gem_test.rb
160
- - test/test/performance/browsing_test.rb
161
- - test/test/test_helper.rb
162
- - test/test/unit/.gitkeep
163
- - test/test/unit/cone_init_test.rb
164
- - test/vendor/assets/javascripts/.gitkeep
165
- - test/vendor/assets/stylesheets/.gitkeep
166
- - test/vendor/plugins/.gitkeep
113
+ test_files: []
@@ -1,12 +0,0 @@
1
- require 'test_helper'
2
- require 'rails/performance_test_help'
3
-
4
- class BrowsingTest < ActionDispatch::PerformanceTest
5
- # Refer to the documentation for all available options
6
- # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
7
- # :output => 'tmp/performance', :formats => [:flat] }
8
-
9
- def test_homepage
10
- get '/'
11
- end
12
- end
@@ -1,7 +0,0 @@
1
- require 'test_helper'
2
-
3
- class ConeBootTest < ActiveSupport::TestCase
4
- test 'assets cache clear on init' do
5
- assert Dir["#{::Rails.application.config.instance_eval { @assets }[:cache_store][1]}*"].empty?
6
- end
7
- end