tao_on_rails 0.2.0 → 0.3.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.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tao_on_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Siyuan Liu
@@ -9,10 +9,10 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-12-06 00:00:00.000000000 Z
12
+ date: 2016-12-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: rails
15
+ name: turbolinks
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
18
  - - "~>"
@@ -68,7 +68,7 @@ dependencies:
68
68
  - !ruby/object:Gem::Version
69
69
  version: '4.1'
70
70
  - !ruby/object:Gem::Dependency
71
- name: turbolinks
71
+ name: rails
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - "~>"
@@ -82,76 +82,64 @@ dependencies:
82
82
  - !ruby/object:Gem::Version
83
83
  version: '5.0'
84
84
  - !ruby/object:Gem::Dependency
85
- name: i18n-js
86
- requirement: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - "~>"
89
- - !ruby/object:Gem::Version
90
- version: 3.0.0.rc14
91
- type: :runtime
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - "~>"
96
- - !ruby/object:Gem::Version
97
- version: 3.0.0.rc14
98
- - !ruby/object:Gem::Dependency
99
- name: gon
85
+ name: bundler
100
86
  requirement: !ruby/object:Gem::Requirement
101
87
  requirements:
102
88
  - - "~>"
103
89
  - !ruby/object:Gem::Version
104
- version: '6.0'
105
- type: :runtime
90
+ version: '1.13'
91
+ type: :development
106
92
  prerelease: false
107
93
  version_requirements: !ruby/object:Gem::Requirement
108
94
  requirements:
109
95
  - - "~>"
110
96
  - !ruby/object:Gem::Version
111
- version: '6.0'
97
+ version: '1.13'
112
98
  - !ruby/object:Gem::Dependency
113
- name: bundler
99
+ name: rake
114
100
  requirement: !ruby/object:Gem::Requirement
115
101
  requirements:
116
102
  - - "~>"
117
103
  - !ruby/object:Gem::Version
118
- version: '1.13'
104
+ version: '10.0'
119
105
  type: :development
120
106
  prerelease: false
121
107
  version_requirements: !ruby/object:Gem::Requirement
122
108
  requirements:
123
109
  - - "~>"
124
110
  - !ruby/object:Gem::Version
125
- version: '1.13'
111
+ version: '10.0'
126
112
  - !ruby/object:Gem::Dependency
127
- name: rake
113
+ name: minitest
128
114
  requirement: !ruby/object:Gem::Requirement
129
115
  requirements:
130
116
  - - "~>"
131
117
  - !ruby/object:Gem::Version
132
- version: '10.0'
118
+ version: '5.0'
133
119
  type: :development
134
120
  prerelease: false
135
121
  version_requirements: !ruby/object:Gem::Requirement
136
122
  requirements:
137
123
  - - "~>"
138
124
  - !ruby/object:Gem::Version
139
- version: '10.0'
125
+ version: '5.0'
140
126
  - !ruby/object:Gem::Dependency
141
- name: rspec
127
+ name: blade
142
128
  requirement: !ruby/object:Gem::Requirement
143
129
  requirements:
144
130
  - - "~>"
145
131
  - !ruby/object:Gem::Version
146
- version: '3.0'
132
+ version: 0.7.0
147
133
  type: :development
148
134
  prerelease: false
149
135
  version_requirements: !ruby/object:Gem::Requirement
150
136
  requirements:
151
137
  - - "~>"
152
138
  - !ruby/object:Gem::Version
153
- version: '3.0'
154
- description: The missing frontend solucation for Rails project
139
+ version: 0.7.0
140
+ description: Ruby on Rails lacks a recommended way to structure your frontend code
141
+ for many years. Tao on Rails is the framework to fill the gap which will modularize
142
+ your page with the new Custom Elements v1 API.
155
143
  email:
156
144
  - farthinker@mycolorway.com
157
145
  - t@mycolorway.com
@@ -159,6 +147,7 @@ executables: []
159
147
  extensions: []
160
148
  extra_rdoc_files: []
161
149
  files:
150
+ - ".blade.yml"
162
151
  - ".gitignore"
163
152
  - ".rspec"
164
153
  - ".travis.yml"
@@ -169,6 +158,21 @@ files:
169
158
  - Rakefile
170
159
  - bin/console
171
160
  - bin/setup
161
+ - lib/assets/javascripts/i18n.js
162
+ - lib/assets/javascripts/polyfills/custom-elements.js
163
+ - lib/assets/javascripts/polyfills/es6.js
164
+ - lib/assets/javascripts/polyfills/htmlelement-instanceof.js
165
+ - lib/assets/javascripts/polyfills/native-shim.coffee
166
+ - lib/assets/javascripts/polyfills/polyfills.coffee
167
+ - lib/assets/javascripts/tao.coffee
168
+ - lib/assets/javascripts/tao/application.coffee
169
+ - lib/assets/javascripts/tao/component.coffee
170
+ - lib/assets/javascripts/tao/helpers.coffee
171
+ - lib/assets/javascripts/tao/icons.coffee
172
+ - lib/assets/javascripts/tao/module.coffee
173
+ - lib/assets/javascripts/tao/page.coffee
174
+ - lib/assets/stylesheets/tao.scss
175
+ - lib/assets/stylesheets/tao/icons.scss
172
176
  - lib/tao_on_rails.rb
173
177
  - lib/tao_on_rails/rails.rb
174
178
  - lib/tao_on_rails/rails/engine.rb
@@ -176,17 +180,6 @@ files:
176
180
  - lib/tao_on_rails/rails/version.rb
177
181
  - lib/tasks/tao_icons.rake
178
182
  - tao_on_rails.gemspec
179
- - vendor/assets/javascripts/custom-elements.js
180
- - vendor/assets/javascripts/native-shim.coffee
181
- - vendor/assets/javascripts/tao.coffee
182
- - vendor/assets/javascripts/tao/application.coffee
183
- - vendor/assets/javascripts/tao/component.coffee
184
- - vendor/assets/javascripts/tao/helpers.coffee
185
- - vendor/assets/javascripts/tao/icons.coffee
186
- - vendor/assets/javascripts/tao/module.coffee
187
- - vendor/assets/javascripts/tao/page.coffee
188
- - vendor/assets/stylesheets/tao.scss
189
- - vendor/assets/stylesheets/tao/icons.scss
190
183
  homepage: https://github.com/mycolorway/tao_on_rails
191
184
  licenses:
192
185
  - MIT
@@ -210,5 +203,5 @@ rubyforge_project:
210
203
  rubygems_version: 2.5.1
211
204
  signing_key:
212
205
  specification_version: 4
213
- summary: The missing frontend solucation for Rails project
206
+ summary: The missing frontend solution for Rails project
214
207
  test_files: []
@@ -1,90 +0,0 @@
1
-
2
- window.nativeShim = ->
3
- eval '''
4
- 'use strict';
5
-
6
- const NativeHTMLElement = window.HTMLElement;
7
- const nativeDefine = window.customElements.define;
8
- const nativeGet = window.customElements.get;
9
-
10
- /**
11
- * Map of user-provided constructors to tag names.
12
- *
13
- * @type {Map<Function, string>}
14
- */
15
- const tagnameByConstructor = new Map();
16
-
17
- /**
18
- * Map of tag anmes to user-provided constructors.
19
- *
20
- * @type {Map<string, Function>}
21
- */
22
- const constructorByTagname = new Map();
23
-
24
-
25
- /**
26
- * Whether the constructors are being called by a browser process, ie parsing
27
- * or createElement.
28
- */
29
- let browserConstruction = false;
30
-
31
- /**
32
- * Whether the constructors are being called by a user-space process, ie
33
- * calling an element constructor.
34
- */
35
- let userConstruction = false;
36
-
37
- window.HTMLElement = function() {
38
- if (!browserConstruction) {
39
- const tagname = tagnameByConstructor.get(this.constructor);
40
- const fakeClass = nativeGet.call(window.customElements, tagname);
41
-
42
- // Make sure that the fake constructor doesn't call back to this constructor
43
- userConstruction = true;
44
- const instance = new (fakeClass)();
45
- return instance;
46
- }
47
- // Else do nothing. This will be reached by ES5-style classes doing
48
- // HTMLElement.call() during initialization
49
- browserConstruction = false;
50
- };
51
-
52
- window.HTMLElement.prototype = Object.create(NativeHTMLElement.prototype);
53
- window.HTMLElement.prototype.constructor = window.HTMLElement;
54
-
55
- window.customElements.define = (tagname, elementClass) => {
56
- const elementProto = elementClass.prototype;
57
- const StandInElement = class extends NativeHTMLElement {
58
- constructor() {
59
- // Call the native HTMLElement constructor, this gives us the
60
- // under-construction instance as `this`:
61
- super();
62
-
63
- // The prototype will be wrong up because the browser used our fake
64
- // class, so fix it:
65
- Object.setPrototypeOf(this, elementProto);
66
-
67
- if (!userConstruction) {
68
- // Make sure that user-defined constructor bottom's out to a do-nothing
69
- // HTMLElement() call
70
- browserConstruction = true;
71
- // Call the user-defined constructor on our instance:
72
- elementClass.call(this);
73
- }
74
- userConstruction = false;
75
- }
76
- };
77
- const standInProto = StandInElement.prototype;
78
- StandInElement.observedAttributes = elementClass.observedAttributes;
79
- standInProto.connectedCallback = elementProto.connectedCallback;
80
- standInProto.disconnectedCallback = elementProto.disconnectedCallback;
81
- standInProto.attributeChangedCallback = elementProto.attributeChangedCallback;
82
- standInProto.adoptedCallback = elementProto.adoptedCallback;
83
-
84
- tagnameByConstructor.set(elementClass, tagname);
85
- constructorByTagname.set(tagname, elementClass);
86
- nativeDefine.call(window.customElements, tagname, StandInElement);
87
- };
88
-
89
- window.customElements.get = (tagname) => constructorByTagname.get(tagname);
90
- '''
@@ -1,2 +0,0 @@
1
-
2
- # generate this file by exec: rake tao:generate_icons