iced-rails 0.1 → 0.2

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.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +10 -0
  3. data/iced-rails.gemspec +4 -1
  4. data/lib/iced/rails/version.rb +1 -1
  5. data/spec/application_spec.rb +9 -0
  6. data/spec/dummy/README.rdoc +261 -0
  7. data/spec/dummy/Rakefile +7 -0
  8. data/spec/dummy/app/assets/javascripts/application.iced +10 -0
  9. data/spec/dummy/app/assets/javascripts/example.iced +1 -0
  10. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  11. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  12. data/spec/dummy/app/controllers/dashboard_controller.rb +4 -0
  13. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  14. data/spec/dummy/app/mailers/.gitkeep +0 -0
  15. data/spec/dummy/app/models/.gitkeep +0 -0
  16. data/spec/dummy/app/views/dashboard/index.html.erb +1 -0
  17. data/spec/dummy/app/views/layouts/application.html.erb +15 -0
  18. data/spec/dummy/config.ru +4 -0
  19. data/spec/dummy/config/application.rb +59 -0
  20. data/spec/dummy/config/boot.rb +10 -0
  21. data/spec/dummy/config/database.yml +11 -0
  22. data/spec/dummy/config/database.yml.example +11 -0
  23. data/spec/dummy/config/environment.rb +5 -0
  24. data/spec/dummy/config/environments/development.rb +37 -0
  25. data/spec/dummy/config/environments/production.rb +67 -0
  26. data/spec/dummy/config/environments/test.rb +37 -0
  27. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  28. data/spec/dummy/config/initializers/inflections.rb +15 -0
  29. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  30. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  31. data/spec/dummy/config/initializers/session_store.rb +8 -0
  32. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  33. data/spec/dummy/config/locales/en.yml +6 -0
  34. data/spec/dummy/config/routes.rb +3 -0
  35. data/spec/dummy/db/development.sqlite3 +0 -0
  36. data/spec/dummy/db/schema.rb +16 -0
  37. data/spec/dummy/db/test.sqlite3 +0 -0
  38. data/spec/dummy/lib/assets/.gitkeep +0 -0
  39. data/spec/dummy/log/.gitkeep +0 -0
  40. data/spec/dummy/log/development.log +388 -0
  41. data/spec/dummy/log/test.log +4 -0
  42. data/spec/dummy/public/404.html +26 -0
  43. data/spec/dummy/public/422.html +26 -0
  44. data/spec/dummy/public/500.html +25 -0
  45. data/spec/dummy/public/favicon.ico +0 -0
  46. data/spec/dummy/script/rails +6 -0
  47. data/spec/iced_spec.rb +79 -0
  48. data/spec/spec_helper.rb +23 -0
  49. metadata +153 -14
@@ -0,0 +1,4 @@
1
+  (0.2ms) begin transaction
2
+  (0.0ms) rollback transaction
3
+  (0.0ms) begin transaction
4
+  (0.0ms) rollback transaction
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
data/spec/iced_spec.rb ADDED
@@ -0,0 +1,79 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'iced engine' do
4
+
5
+ it 'should generate proper js' do
6
+ js = <<-JS
7
+ (function() {
8
+ var iced, search, __iced_k,
9
+ __slice = [].slice;
10
+
11
+ iced = {
12
+ Deferrals: (function() {
13
+
14
+ function _Class(_arg) {
15
+ this.continuation = _arg;
16
+ this.count = 1;
17
+ this.ret = null;
18
+ }
19
+
20
+ _Class.prototype._fulfill = function() {
21
+ if (!--this.count) return this.continuation(this.ret);
22
+ };
23
+
24
+ _Class.prototype.defer = function(defer_params) {
25
+ var _this = this;
26
+ ++this.count;
27
+ return function() {
28
+ var inner_params, _ref;
29
+ inner_params = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
30
+ if (defer_params != null) {
31
+ if ((_ref = defer_params.assign_fn) != null) {
32
+ _ref.apply(null, inner_params);
33
+ }
34
+ }
35
+ return _this._fulfill();
36
+ };
37
+ };
38
+
39
+ return _Class;
40
+
41
+ })(),
42
+ findDeferral: function() {
43
+ return null;
44
+ }
45
+ };
46
+ __iced_k = function() {};
47
+
48
+ search = function(keyword, cb) {
49
+ var host, json, url, ___iced_passed_deferral, __iced_deferrals,
50
+ _this = this;
51
+ ___iced_passed_deferral = iced.findDeferral(arguments);
52
+ host = "http://search.twitter.com/";
53
+ url = "" + host + "/search.json?q=" + keyword + "&callback=?";
54
+ (function(__iced_k) {
55
+ __iced_deferrals = new iced.Deferrals(__iced_k, {
56
+ parent: ___iced_passed_deferral,
57
+ funcname: "search"
58
+ });
59
+ $.getJSON(url, __iced_deferrals.defer({
60
+ assign_fn: (function() {
61
+ return function() {
62
+ return json = arguments[0];
63
+ };
64
+ })(),
65
+ lineno: 5
66
+ }));
67
+ __iced_deferrals._fulfill();
68
+ })(function() {
69
+ return cb(json.results);
70
+ });
71
+ };
72
+
73
+ }).call(this);
74
+ JS
75
+ asset = Rails.application.assets.find_asset('application.js')
76
+ asset.to_s.should == js
77
+ end
78
+
79
+ end
@@ -0,0 +1,23 @@
1
+ require 'rubygems'
2
+ begin
3
+ require 'debugger'
4
+ rescue LoadError
5
+ end
6
+
7
+ begin
8
+ require 'ruby-debug'
9
+ rescue LoadError
10
+ end
11
+ require 'bundler/setup'
12
+
13
+ ENV['RAILS_ENV'] = 'test'
14
+ require File.expand_path('../dummy/config/environment.rb', __FILE__)
15
+ require 'rspec/rails'
16
+
17
+ ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')
18
+
19
+ Dir[File.join(ENGINE_RAILS_ROOT, 'spec/support/**/*.rb')].each { |f| require f }
20
+
21
+ RSpec.configure do |config|
22
+ config.use_transactional_fixtures = true
23
+ end
metadata CHANGED
@@ -1,49 +1,77 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iced-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: '0.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raphael Randschau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-06 00:00:00.000000000 Z
11
+ date: 2014-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iced-coffee-script
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
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '3.2'
34
- - - <
34
+ - - "<"
35
35
  - !ruby/object:Gem::Version
36
36
  version: '5.0'
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - '>='
41
+ - - ">="
42
42
  - !ruby/object:Gem::Version
43
43
  version: '3.2'
44
- - - <
44
+ - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: '5.0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: rspec-rails
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ - !ruby/object:Gem::Dependency
62
+ name: sqlite3
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
47
75
  description: IcedCoffeeScript adapter for the Rails asset pipeline.
48
76
  email:
49
77
  - nicolai86@me.com
@@ -51,7 +79,7 @@ executables: []
51
79
  extensions: []
52
80
  extra_rdoc_files: []
53
81
  files:
54
- - .gitignore
82
+ - ".gitignore"
55
83
  - Gemfile
56
84
  - LICENSE.txt
57
85
  - README.md
@@ -61,8 +89,66 @@ files:
61
89
  - lib/iced/rails/engine.rb
62
90
  - lib/iced/rails/template_handler.rb
63
91
  - lib/iced/rails/version.rb
92
+ - spec/application_spec.rb
93
+ - spec/dummy/README.rdoc
94
+ - spec/dummy/Rakefile
95
+ - spec/dummy/app/assets/javascripts/application.iced
96
+ - spec/dummy/app/assets/javascripts/example.iced
97
+ - spec/dummy/app/assets/stylesheets/application.css
98
+ - spec/dummy/app/controllers/application_controller.rb
99
+ - spec/dummy/app/controllers/dashboard_controller.rb
100
+ - spec/dummy/app/helpers/application_helper.rb
101
+ - spec/dummy/app/mailers/.gitkeep
102
+ - spec/dummy/app/models/.gitkeep
103
+ - spec/dummy/app/views/dashboard/index.html.erb
104
+ - spec/dummy/app/views/layouts/application.html.erb
105
+ - spec/dummy/config.ru
106
+ - spec/dummy/config/application.rb
107
+ - spec/dummy/config/boot.rb
108
+ - spec/dummy/config/database.yml
109
+ - spec/dummy/config/database.yml.example
110
+ - spec/dummy/config/environment.rb
111
+ - spec/dummy/config/environments/development.rb
112
+ - spec/dummy/config/environments/production.rb
113
+ - spec/dummy/config/environments/test.rb
114
+ - spec/dummy/config/initializers/backtrace_silencers.rb
115
+ - spec/dummy/config/initializers/inflections.rb
116
+ - spec/dummy/config/initializers/mime_types.rb
117
+ - spec/dummy/config/initializers/secret_token.rb
118
+ - spec/dummy/config/initializers/session_store.rb
119
+ - spec/dummy/config/initializers/wrap_parameters.rb
120
+ - spec/dummy/config/locales/en.yml
121
+ - spec/dummy/config/routes.rb
122
+ - spec/dummy/db/development.sqlite3
123
+ - spec/dummy/db/schema.rb
124
+ - spec/dummy/db/test.sqlite3
125
+ - spec/dummy/lib/assets/.gitkeep
126
+ - spec/dummy/log/.gitkeep
127
+ - spec/dummy/log/development.log
128
+ - spec/dummy/log/test.log
129
+ - spec/dummy/public/404.html
130
+ - spec/dummy/public/422.html
131
+ - spec/dummy/public/500.html
132
+ - spec/dummy/public/favicon.ico
133
+ - spec/dummy/script/rails
134
+ - spec/dummy/tmp/cache/assets/development/sprockets/05e6c2d85bfe685a0424ace4a37b58f2
135
+ - spec/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705
136
+ - spec/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953
137
+ - spec/dummy/tmp/cache/assets/development/sprockets/8ca2455eb393709073b6913f978142eb
138
+ - spec/dummy/tmp/cache/assets/development/sprockets/8d45d66bb40551778fd173020fdd81a2
139
+ - spec/dummy/tmp/cache/assets/development/sprockets/94539f8a57f688ac8cc73fd8f08ba516
140
+ - spec/dummy/tmp/cache/assets/development/sprockets/9f36801c8d2217e1f21988791c75485f
141
+ - spec/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6
142
+ - spec/dummy/tmp/cache/assets/development/sprockets/fc095e9e835f32dd6450c8af3593ea3a
143
+ - spec/dummy/tmp/cache/assets/test/sprockets/8d45d66bb40551778fd173020fdd81a2
144
+ - spec/dummy/tmp/cache/assets/test/sprockets/9f36801c8d2217e1f21988791c75485f
145
+ - spec/dummy/tmp/cache/assets/test/sprockets/fc095e9e835f32dd6450c8af3593ea3a
146
+ - spec/dummy/tmp/pids/server.pid
147
+ - spec/iced_spec.rb
148
+ - spec/spec_helper.rb
64
149
  homepage: https://github.com/nicolai86/iced-rails
65
- licenses: []
150
+ licenses:
151
+ - MIT
66
152
  metadata: {}
67
153
  post_install_message:
68
154
  rdoc_options: []
@@ -70,18 +156,71 @@ require_paths:
70
156
  - lib
71
157
  required_ruby_version: !ruby/object:Gem::Requirement
72
158
  requirements:
73
- - - '>='
159
+ - - ">="
74
160
  - !ruby/object:Gem::Version
75
161
  version: '0'
76
162
  required_rubygems_version: !ruby/object:Gem::Requirement
77
163
  requirements:
78
- - - '>='
164
+ - - ">="
79
165
  - !ruby/object:Gem::Version
80
166
  version: '0'
81
167
  requirements: []
82
168
  rubyforge_project:
83
- rubygems_version: 2.0.3
169
+ rubygems_version: 2.2.2
84
170
  signing_key:
85
171
  specification_version: 4
86
172
  summary: IcedCoffeeScript adapter for the Rails asset pipeline.
87
- test_files: []
173
+ test_files:
174
+ - spec/application_spec.rb
175
+ - spec/dummy/app/assets/javascripts/application.iced
176
+ - spec/dummy/app/assets/javascripts/example.iced
177
+ - spec/dummy/app/assets/stylesheets/application.css
178
+ - spec/dummy/app/controllers/application_controller.rb
179
+ - spec/dummy/app/controllers/dashboard_controller.rb
180
+ - spec/dummy/app/helpers/application_helper.rb
181
+ - spec/dummy/app/views/dashboard/index.html.erb
182
+ - spec/dummy/app/views/layouts/application.html.erb
183
+ - spec/dummy/config/application.rb
184
+ - spec/dummy/config/boot.rb
185
+ - spec/dummy/config/database.yml
186
+ - spec/dummy/config/database.yml.example
187
+ - spec/dummy/config/environment.rb
188
+ - spec/dummy/config/environments/development.rb
189
+ - spec/dummy/config/environments/production.rb
190
+ - spec/dummy/config/environments/test.rb
191
+ - spec/dummy/config/initializers/backtrace_silencers.rb
192
+ - spec/dummy/config/initializers/inflections.rb
193
+ - spec/dummy/config/initializers/mime_types.rb
194
+ - spec/dummy/config/initializers/secret_token.rb
195
+ - spec/dummy/config/initializers/session_store.rb
196
+ - spec/dummy/config/initializers/wrap_parameters.rb
197
+ - spec/dummy/config/locales/en.yml
198
+ - spec/dummy/config/routes.rb
199
+ - spec/dummy/config.ru
200
+ - spec/dummy/db/development.sqlite3
201
+ - spec/dummy/db/schema.rb
202
+ - spec/dummy/db/test.sqlite3
203
+ - spec/dummy/log/development.log
204
+ - spec/dummy/log/test.log
205
+ - spec/dummy/public/404.html
206
+ - spec/dummy/public/422.html
207
+ - spec/dummy/public/500.html
208
+ - spec/dummy/public/favicon.ico
209
+ - spec/dummy/Rakefile
210
+ - spec/dummy/README.rdoc
211
+ - spec/dummy/script/rails
212
+ - spec/dummy/tmp/cache/assets/development/sprockets/05e6c2d85bfe685a0424ace4a37b58f2
213
+ - spec/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705
214
+ - spec/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953
215
+ - spec/dummy/tmp/cache/assets/development/sprockets/8ca2455eb393709073b6913f978142eb
216
+ - spec/dummy/tmp/cache/assets/development/sprockets/8d45d66bb40551778fd173020fdd81a2
217
+ - spec/dummy/tmp/cache/assets/development/sprockets/94539f8a57f688ac8cc73fd8f08ba516
218
+ - spec/dummy/tmp/cache/assets/development/sprockets/9f36801c8d2217e1f21988791c75485f
219
+ - spec/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6
220
+ - spec/dummy/tmp/cache/assets/development/sprockets/fc095e9e835f32dd6450c8af3593ea3a
221
+ - spec/dummy/tmp/cache/assets/test/sprockets/8d45d66bb40551778fd173020fdd81a2
222
+ - spec/dummy/tmp/cache/assets/test/sprockets/9f36801c8d2217e1f21988791c75485f
223
+ - spec/dummy/tmp/cache/assets/test/sprockets/fc095e9e835f32dd6450c8af3593ea3a
224
+ - spec/dummy/tmp/pids/server.pid
225
+ - spec/iced_spec.rb
226
+ - spec/spec_helper.rb