cdnjs-rails 0.0.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/.DS_Store +0 -0
  3. data/.gitignore +44 -0
  4. data/README.md +7 -7
  5. data/cdnjs-rails-0.0.1.gem +0 -0
  6. data/cdnjs-rails.gemspec +1 -1
  7. data/lib/cdnjs-rails/view_helpers.rb +3 -3
  8. metadata +8 -63
  9. data/demoapp/.bundle/config +0 -4
  10. data/demoapp/.gitignore +0 -58
  11. data/demoapp/.ruby-version +0 -1
  12. data/demoapp/Gemfile +0 -47
  13. data/demoapp/Gemfile.lock +0 -121
  14. data/demoapp/README.rdoc +0 -28
  15. data/demoapp/Rakefile +0 -6
  16. data/demoapp/app/assets/javascripts/application.js +0 -14
  17. data/demoapp/app/assets/javascripts/home.js.coffee +0 -3
  18. data/demoapp/app/assets/stylesheets/application.css +0 -13
  19. data/demoapp/app/assets/stylesheets/home.css.scss +0 -3
  20. data/demoapp/app/controllers/application_controller.rb +0 -5
  21. data/demoapp/app/controllers/concerns/.keep +0 -0
  22. data/demoapp/app/controllers/home_controller.rb +0 -4
  23. data/demoapp/app/helpers/application_helper.rb +0 -2
  24. data/demoapp/app/helpers/home_helper.rb +0 -2
  25. data/demoapp/app/mailers/.keep +0 -0
  26. data/demoapp/app/models/.keep +0 -0
  27. data/demoapp/app/models/concerns/.keep +0 -0
  28. data/demoapp/app/views/home/index.html.erb +0 -1
  29. data/demoapp/app/views/layouts/application.html.erb +0 -16
  30. data/demoapp/bin/bundle +0 -3
  31. data/demoapp/bin/rails +0 -4
  32. data/demoapp/bin/rake +0 -4
  33. data/demoapp/config.ru +0 -4
  34. data/demoapp/config/application.rb +0 -36
  35. data/demoapp/config/boot.rb +0 -4
  36. data/demoapp/config/database.yml +0 -25
  37. data/demoapp/config/environment.rb +0 -5
  38. data/demoapp/config/environments/development.rb +0 -29
  39. data/demoapp/config/environments/production.rb +0 -80
  40. data/demoapp/config/environments/test.rb +0 -36
  41. data/demoapp/config/initializers/backtrace_silencers.rb +0 -7
  42. data/demoapp/config/initializers/filter_parameter_logging.rb +0 -4
  43. data/demoapp/config/initializers/inflections.rb +0 -16
  44. data/demoapp/config/initializers/mime_types.rb +0 -5
  45. data/demoapp/config/initializers/secret_token.rb +0 -12
  46. data/demoapp/config/initializers/session_store.rb +0 -3
  47. data/demoapp/config/initializers/wrap_parameters.rb +0 -14
  48. data/demoapp/config/locales/en.yml +0 -23
  49. data/demoapp/config/routes.rb +0 -52
  50. data/demoapp/db/schema.rb +0 -16
  51. data/demoapp/db/seeds.rb +0 -7
  52. data/demoapp/lib/assets/.keep +0 -0
  53. data/demoapp/lib/tasks/.keep +0 -0
  54. data/demoapp/log/.keep +0 -0
  55. data/demoapp/public/404.html +0 -58
  56. data/demoapp/public/422.html +0 -58
  57. data/demoapp/public/500.html +0 -57
  58. data/demoapp/public/favicon.ico +0 -0
  59. data/demoapp/public/robots.txt +0 -5
  60. data/demoapp/test.rb +0 -24
  61. data/demoapp/vendor/assets/javascripts/.keep +0 -0
  62. data/demoapp/vendor/assets/javascripts/jquery/jquery-ui.min.js +0 -12
  63. data/demoapp/vendor/assets/javascripts/jquery/jquery.min.js +0 -6
  64. data/demoapp/vendor/assets/stylesheets/.keep +0 -0
  65. data/lib/.DS_Store +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8c92a0e42cbfd9d9772112a66c36c17be8d98d39
4
- data.tar.gz: ea068b58b24500ee51c8b8e8598d7131b37e7994
3
+ metadata.gz: f055a21f0313710f8090950c96265c919f4647ac
4
+ data.tar.gz: 1e752296317ef565808b7363e44b95aebbfd4d1e
5
5
  SHA512:
6
- metadata.gz: 039acde0034b1f11924b5dfdef37fdf0172740334856931024b2fc870867ca5f58106dbe1f1f766e4a439190ae6134811f8449a288f1627772d97550a3f23d9a
7
- data.tar.gz: b86cd64ea1d271a4eede0de7ed2e6ebe6cf102046636502cfd415357c32e64b99ae3ee569cc836293044e751c7013067478da0099e8877391f0535255ce91b0f
6
+ metadata.gz: 5d55aba083285f1182cf0733ad1499ffb02cb4a4328732680a4ad28f2c8d0cdefca8fb93ab9bfe03d0112ec1fc4a3187063df8a272fb464d72c2107321b682cc
7
+ data.tar.gz: c0cc6f60709fac25e6c7ea415fb5dc5b1000bb285813f82a30e0fe8c9008cfbf235e854ab2b078fed5ebb0a68bbb8d936de7f4b626563505fdc86e9f81533aa0
data/.DS_Store CHANGED
Binary file
@@ -0,0 +1,44 @@
1
+ ###############################################################################################
2
+ # APPLICATION #
3
+ ###############################################################################################
4
+ *.com
5
+ *.class
6
+ *.dll
7
+ *.exe
8
+ *.o
9
+ *.so
10
+ *.psd
11
+ *.ai
12
+ *.ase
13
+
14
+ ###############################################################################################
15
+ # Packages #
16
+ ###############################################################################################
17
+ *.7z
18
+ *.dmg
19
+ *.gz
20
+ *.iso
21
+ *.jar
22
+ *.rar
23
+ *.tar
24
+ *.zip
25
+
26
+ ###############################################################################################
27
+ # Logs and databases #
28
+ ###############################################################################################
29
+ *.log
30
+ *.sql
31
+ *.sqlite
32
+
33
+ ###############################################################################################
34
+ # OS generated files #
35
+ ###############################################################################################
36
+ .DS_Store
37
+ .DS_Store?
38
+ ._*
39
+ .Spotlight-V100
40
+ .Trashes
41
+ Icon?
42
+ ehthumbs.db
43
+ Thumbs.db
44
+ *.*~
data/README.md CHANGED
@@ -29,16 +29,16 @@ On top of that, if you're using asset pipeline, you may have noticed that the ma
29
29
 
30
30
  If you're using the asset pipeline with Rails 3.1+,
31
31
 
32
- - Start by removing `//= require jquery`, `//= require jquery-ujs`, and other includes where applicable from your `application.js` file.
32
+ - Start by removing `//= require jquery` and other includes where applicable from your `application.js` file.
33
33
 
34
34
  If you're using the asset pipeline with Rails 4+,
35
35
 
36
36
  - Create a vendor directory `mkdir vendor/assets/javascripts/` for each library you would like to include, or only if you see fit
37
37
  - Download the version of the library you want to use from the [cdnjs.com](http://cdnjs.com/) and save the file to this directory. The file should look something like `jquery.min.js`.
38
- - Verify you have removed jquery-rails gem, it is not needed. Only include this gem reference.:
38
+ - Add the gem to your gem file:
39
39
 
40
40
  ```ruby
41
- # gem 'jquery-rails'
41
+ gem 'jquery-rails'
42
42
  gem 'cdnjs-rails'
43
43
  ```
44
44
 
@@ -47,8 +47,8 @@ gem 'cdnjs-rails'
47
47
  ```ruby
48
48
  # Specify CDNJS Libraries to include in the header with fallback using an array of hashes
49
49
  config.cdnjs = [
50
- {'cdnjs' => 'jquery/2.0.2/jquery.min.js', 'localpath' => 'jquery/jquery.min.js'},
51
- {'cdnjs' => 'jqueryui/1.10.3/jquery-ui.min.js','localpath' => 'jquery/jquery-ui.min.js'}
50
+ {'cdnjs' => 'jquery/2.0.2/jquery.min.js', 'localpath' => 'jquery.min.js'},
51
+ {'cdnjs' => 'jqueryui/1.10.3/jquery-ui.min.js','localpath' => 'jquery-ui.min.js'}
52
52
  ]
53
53
  ```
54
54
 
@@ -86,13 +86,13 @@ The gem will generate the following across all modes production, testing, and de
86
86
  <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
87
87
  <script>
88
88
  //<![CDATA[
89
- window.jQuery || document.write(unescape('%3Cscript src="/assets/jquery/jquery.min.js?body=1">%3C/script>'))
89
+ window.jQuery || document.write(unescape('%3Cscript src="/assets/jquery.min.js?body=1">%3C/script>'))
90
90
  //]]>
91
91
  </script>
92
92
  <script src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
93
93
  <script>
94
94
  //<![CDATA[
95
- window.jQuery || document.write(unescape('%3Cscript src="/assets/jquery/jquery-ui.min.js?body=1">%3C/script>'))
95
+ window.jQuery || document.write(unescape('%3Cscript src="/assets/jquery-ui.min.js?body=1">%3C/script>'))
96
96
  //]]>
97
97
  </script>
98
98
  ```
Binary file
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.name = "cdnjs-rails"
14
14
  s.licenses = "GPL"
15
- s.version = '0.0.1'
15
+ s.version = '1.0.0'
16
16
 
17
17
  end
18
18
 
@@ -5,10 +5,10 @@ module CDNJS
5
5
  js_string_output = Array.new
6
6
 
7
7
  cdn_vars.each do |js_file_config|
8
-
8
+
9
9
  js_string_output << javascript_include_tag("//cdnjs.cloudflare.com/ajax/libs/#{js_file_config['cdnjs']}")
10
- js_string_output << javascript_tag("window.jQuery || document.write(unescape('#{javascript_include_tag(js_file_config['localpath']).gsub('<','%3C')}'))")
11
-
10
+ js_string_output << javascript_tag("window.jQuery || document.write(unescape('#{asset_path(js_file_config['localpath']).gsub('<','%3C')}'))")
11
+
12
12
  end
13
13
 
14
14
  return js_string_output.join("\n").html_safe
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cdnjs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Hough
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-17 00:00:00.000000000 Z
11
+ date: 2014-02-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Use the CDNJS CDN to serve files and fall back to the local version if
14
14
  the CDN is unreachable.
@@ -18,70 +18,15 @@ executables: []
18
18
  extensions: []
19
19
  extra_rdoc_files: []
20
20
  files:
21
- - .DS_Store
21
+ - ".DS_Store"
22
+ - ".gitignore"
22
23
  - Gemfile
23
24
  - Gemfile.lock
24
25
  - LICENSE
25
26
  - README.md
26
27
  - Rakefile
28
+ - cdnjs-rails-0.0.1.gem
27
29
  - cdnjs-rails.gemspec
28
- - demoapp/.bundle/config
29
- - demoapp/.gitignore
30
- - demoapp/.ruby-version
31
- - demoapp/Gemfile
32
- - demoapp/Gemfile.lock
33
- - demoapp/README.rdoc
34
- - demoapp/Rakefile
35
- - demoapp/app/assets/javascripts/application.js
36
- - demoapp/app/assets/javascripts/home.js.coffee
37
- - demoapp/app/assets/stylesheets/application.css
38
- - demoapp/app/assets/stylesheets/home.css.scss
39
- - demoapp/app/controllers/application_controller.rb
40
- - demoapp/app/controllers/concerns/.keep
41
- - demoapp/app/controllers/home_controller.rb
42
- - demoapp/app/helpers/application_helper.rb
43
- - demoapp/app/helpers/home_helper.rb
44
- - demoapp/app/mailers/.keep
45
- - demoapp/app/models/.keep
46
- - demoapp/app/models/concerns/.keep
47
- - demoapp/app/views/home/index.html.erb
48
- - demoapp/app/views/layouts/application.html.erb
49
- - demoapp/bin/bundle
50
- - demoapp/bin/rails
51
- - demoapp/bin/rake
52
- - demoapp/config.ru
53
- - demoapp/config/application.rb
54
- - demoapp/config/boot.rb
55
- - demoapp/config/database.yml
56
- - demoapp/config/environment.rb
57
- - demoapp/config/environments/development.rb
58
- - demoapp/config/environments/production.rb
59
- - demoapp/config/environments/test.rb
60
- - demoapp/config/initializers/backtrace_silencers.rb
61
- - demoapp/config/initializers/filter_parameter_logging.rb
62
- - demoapp/config/initializers/inflections.rb
63
- - demoapp/config/initializers/mime_types.rb
64
- - demoapp/config/initializers/secret_token.rb
65
- - demoapp/config/initializers/session_store.rb
66
- - demoapp/config/initializers/wrap_parameters.rb
67
- - demoapp/config/locales/en.yml
68
- - demoapp/config/routes.rb
69
- - demoapp/db/schema.rb
70
- - demoapp/db/seeds.rb
71
- - demoapp/lib/assets/.keep
72
- - demoapp/lib/tasks/.keep
73
- - demoapp/log/.keep
74
- - demoapp/public/404.html
75
- - demoapp/public/422.html
76
- - demoapp/public/500.html
77
- - demoapp/public/favicon.ico
78
- - demoapp/public/robots.txt
79
- - demoapp/test.rb
80
- - demoapp/vendor/assets/javascripts/.keep
81
- - demoapp/vendor/assets/javascripts/jquery/jquery-ui.min.js
82
- - demoapp/vendor/assets/javascripts/jquery/jquery.min.js
83
- - demoapp/vendor/assets/stylesheets/.keep
84
- - lib/.DS_Store
85
30
  - lib/cdnjs-rails.rb
86
31
  - lib/cdnjs-rails/railtie.rb
87
32
  - lib/cdnjs-rails/view_helpers.rb
@@ -95,17 +40,17 @@ require_paths:
95
40
  - lib
96
41
  required_ruby_version: !ruby/object:Gem::Requirement
97
42
  requirements:
98
- - - '>='
43
+ - - ">="
99
44
  - !ruby/object:Gem::Version
100
45
  version: '0'
101
46
  required_rubygems_version: !ruby/object:Gem::Requirement
102
47
  requirements:
103
- - - '>='
48
+ - - ">="
104
49
  - !ruby/object:Gem::Version
105
50
  version: '0'
106
51
  requirements: []
107
52
  rubyforge_project:
108
- rubygems_version: 2.0.3
53
+ rubygems_version: 2.1.10
109
54
  signing_key:
110
55
  specification_version: 4
111
56
  summary: A gem to serve CDNJS files with fall back protection.
@@ -1,4 +0,0 @@
1
- ---
2
- BUNDLE_PATH: .bundle
3
- BUNDLE_BIN: .bundle/binstubs
4
- BUNDLE_DISABLE_SHARED_GEMS: '1'
@@ -1,58 +0,0 @@
1
- # See http://help.github.com/ignore-files/ for more about ignoring files.
2
- #
3
- # If you find yourself ignoring temporary files generated by your text editor
4
- # or operating system, you probably want to add a global ignore instead:
5
- # git config --global core.excludesfile ~/.gitignore_global
6
-
7
- # Ignore specific config files
8
- .bundle/*
9
- !.bundle/config
10
- .chef
11
- .vagrant
12
-
13
- # Ignore the default SQLite database.
14
- /db/*.sqlite3
15
-
16
- # Ignore all logfiles and tempfiles.
17
- /log/*.log
18
- /tmp
19
-
20
- # APPLICATION #
21
- ###################
22
- *.com
23
- *.class
24
- *.dll
25
- *.exe
26
- *.o
27
- *.so
28
-
29
- # Packages #
30
- ############
31
- # it's better to unpack these files and commit the raw source
32
- # git has its own built in compression methods
33
- *.7z
34
- *.dmg
35
- *.gz
36
- *.iso
37
- *.jar
38
- *.rar
39
- *.tar
40
- *.zip
41
-
42
- # Logs and databases #
43
- ######################
44
- *.log
45
- *.sql
46
- *.sqlite
47
-
48
- # OS generated files #
49
- ######################
50
- *.DS_Store
51
- .DS_Store?
52
- ._*
53
- .Spotlight-V100
54
- .Trashes
55
- Icon?
56
- ehthumbs.db
57
- Thumbs.db
58
-
@@ -1 +0,0 @@
1
- 2.0.0-p0
@@ -1,47 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
4
- gem 'rails', '4.0.0.rc1'
5
-
6
- # Use sqlite3 as the database for Active Record
7
- gem 'sqlite3'
8
-
9
- # Use SCSS for stylesheets
10
- gem 'sass-rails', '~> 4.0.0.rc1'
11
-
12
- # Use Uglifier as compressor for JavaScript assets
13
- gem 'uglifier', '>= 1.3.0'
14
-
15
- # Use CoffeeScript for .js.coffee assets and views
16
- gem 'coffee-rails', '~> 4.0.0'
17
-
18
- # See https://github.com/sstephenson/execjs#readme for more supported runtimes
19
- # gem 'therubyracer', platforms: :ruby
20
-
21
- # Use jquery as the JavaScript library
22
- # gem 'jquery-rails'
23
- gem 'cdnjs-rails'
24
- # gem 'cdnjs-rails', path: '../'
25
-
26
- # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
27
- gem 'turbolinks'
28
-
29
- # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
30
- gem 'jbuilder', '~> 1.0.1'
31
-
32
- group :doc do
33
- # bundle exec rake doc:rails generates the API under doc/api.
34
- gem 'sdoc', require: false
35
- end
36
-
37
- # Use ActiveModel has_secure_password
38
- # gem 'bcrypt-ruby', '~> 3.0.0'
39
-
40
- # Use unicorn as the app server
41
- # gem 'unicorn'
42
-
43
- # Use Capistrano for deployment
44
- # gem 'capistrano', group: :development
45
-
46
- # Use debugger
47
- # gem 'debugger', group: [:development, :test]
@@ -1,121 +0,0 @@
1
- PATH
2
- remote: ../
3
- specs:
4
- cdnjs-rails (0.0.1)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- actionmailer (4.0.0.rc1)
10
- actionpack (= 4.0.0.rc1)
11
- mail (~> 2.5.3)
12
- actionpack (4.0.0.rc1)
13
- activesupport (= 4.0.0.rc1)
14
- builder (~> 3.1.0)
15
- erubis (~> 2.7.0)
16
- rack (~> 1.5.2)
17
- rack-test (~> 0.6.2)
18
- activemodel (4.0.0.rc1)
19
- activesupport (= 4.0.0.rc1)
20
- builder (~> 3.1.0)
21
- activerecord (4.0.0.rc1)
22
- activemodel (= 4.0.0.rc1)
23
- activerecord-deprecated_finders (~> 1.0.2)
24
- activesupport (= 4.0.0.rc1)
25
- arel (~> 4.0.0)
26
- activerecord-deprecated_finders (1.0.3)
27
- activesupport (4.0.0.rc1)
28
- i18n (~> 0.6, >= 0.6.4)
29
- minitest (~> 4.2)
30
- multi_json (~> 1.3)
31
- thread_safe (~> 0.1)
32
- tzinfo (~> 0.3.37)
33
- arel (4.0.0)
34
- atomic (1.1.9)
35
- builder (3.1.4)
36
- coffee-rails (4.0.0)
37
- coffee-script (>= 2.2.0)
38
- railties (>= 4.0.0.beta, < 5.0)
39
- coffee-script (2.2.0)
40
- coffee-script-source
41
- execjs
42
- coffee-script-source (1.6.2)
43
- erubis (2.7.0)
44
- execjs (1.4.0)
45
- multi_json (~> 1.0)
46
- hike (1.2.3)
47
- i18n (0.6.4)
48
- jbuilder (1.0.2)
49
- activesupport (>= 3.0.0)
50
- json (1.8.0)
51
- mail (2.5.4)
52
- mime-types (~> 1.16)
53
- treetop (~> 1.4.8)
54
- mime-types (1.23)
55
- minitest (4.7.4)
56
- multi_json (1.7.6)
57
- polyglot (0.3.3)
58
- rack (1.5.2)
59
- rack-test (0.6.2)
60
- rack (>= 1.0)
61
- rails (4.0.0.rc1)
62
- actionmailer (= 4.0.0.rc1)
63
- actionpack (= 4.0.0.rc1)
64
- activerecord (= 4.0.0.rc1)
65
- activesupport (= 4.0.0.rc1)
66
- bundler (>= 1.3.0, < 2.0)
67
- railties (= 4.0.0.rc1)
68
- sprockets-rails (~> 2.0.0.rc4)
69
- railties (4.0.0.rc1)
70
- actionpack (= 4.0.0.rc1)
71
- activesupport (= 4.0.0.rc1)
72
- rake (>= 0.8.7)
73
- thor (>= 0.18.1, < 2.0)
74
- rake (10.0.4)
75
- rdoc (3.12.2)
76
- json (~> 1.4)
77
- sass (3.2.9)
78
- sass-rails (4.0.0.rc2)
79
- railties (>= 4.0.0.beta, < 5.0)
80
- sass (>= 3.1.10)
81
- sprockets-rails (~> 2.0.0)
82
- sdoc (0.3.20)
83
- json (>= 1.1.3)
84
- rdoc (~> 3.10)
85
- sprockets (2.10.0)
86
- hike (~> 1.2)
87
- multi_json (~> 1.0)
88
- rack (~> 1.0)
89
- tilt (~> 1.1, != 1.3.0)
90
- sprockets-rails (2.0.0)
91
- actionpack (>= 3.0)
92
- activesupport (>= 3.0)
93
- sprockets (~> 2.8)
94
- sqlite3 (1.3.7)
95
- thor (0.18.1)
96
- thread_safe (0.1.0)
97
- atomic
98
- tilt (1.4.1)
99
- treetop (1.4.14)
100
- polyglot
101
- polyglot (>= 0.3.1)
102
- turbolinks (1.2.0)
103
- coffee-rails
104
- tzinfo (0.3.37)
105
- uglifier (2.1.1)
106
- execjs (>= 0.3.0)
107
- multi_json (~> 1.0, >= 1.0.2)
108
-
109
- PLATFORMS
110
- ruby
111
-
112
- DEPENDENCIES
113
- cdnjs-rails!
114
- coffee-rails (~> 4.0.0)
115
- jbuilder (~> 1.0.1)
116
- rails (= 4.0.0.rc1)
117
- sass-rails (~> 4.0.0.rc1)
118
- sdoc
119
- sqlite3
120
- turbolinks
121
- uglifier (>= 1.3.0)