orthodox 0.1.0 → 0.2.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 +4 -4
- data/.gitignore +1 -0
- data/dummy/.gitignore +30 -0
- data/dummy/.ruby-version +1 -0
- data/dummy/Gemfile +64 -0
- data/dummy/Gemfile.lock +234 -0
- data/dummy/README.md +24 -0
- data/dummy/Rakefile +6 -0
- data/dummy/app/channels/application_cable/channel.rb +4 -0
- data/dummy/app/channels/application_cable/connection.rb +4 -0
- data/dummy/app/controllers/application_controller.rb +2 -0
- data/dummy/app/controllers/concerns/.keep +0 -0
- data/dummy/app/helpers/application_helper.rb +2 -0
- data/dummy/app/jobs/application_job.rb +2 -0
- data/dummy/app/mailers/application_mailer.rb +4 -0
- data/dummy/app/models/application_record.rb +3 -0
- data/dummy/app/models/concerns/.keep +0 -0
- data/dummy/app/views/layouts/application.html.erb +15 -0
- data/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/dummy/bin/bundle +3 -0
- data/dummy/bin/rails +9 -0
- data/dummy/bin/rake +9 -0
- data/dummy/bin/setup +36 -0
- data/dummy/bin/spring +17 -0
- data/dummy/bin/update +31 -0
- data/dummy/bin/yarn +11 -0
- data/dummy/config.ru +5 -0
- data/dummy/config/application.rb +19 -0
- data/dummy/config/boot.rb +4 -0
- data/dummy/config/cable.yml +10 -0
- data/dummy/config/credentials.yml.enc +1 -0
- data/dummy/config/database.yml +25 -0
- data/dummy/config/environment.rb +5 -0
- data/dummy/config/environments/development.rb +61 -0
- data/dummy/config/environments/production.rb +94 -0
- data/dummy/config/environments/test.rb +46 -0
- data/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/dummy/config/initializers/assets.rb +14 -0
- data/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/dummy/config/initializers/content_security_policy.rb +25 -0
- data/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/dummy/config/initializers/inflections.rb +16 -0
- data/dummy/config/initializers/mime_types.rb +4 -0
- data/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/dummy/config/locales/en.yml +33 -0
- data/dummy/config/puma.rb +34 -0
- data/dummy/config/routes.rb +3 -0
- data/dummy/config/spring.rb +6 -0
- data/dummy/config/storage.yml +34 -0
- data/dummy/db/seeds.rb +7 -0
- data/dummy/lib/assets/.keep +0 -0
- data/dummy/lib/tasks/.keep +0 -0
- data/dummy/log/.keep +0 -0
- data/dummy/package.json +5 -0
- data/dummy/public/404.html +67 -0
- data/dummy/public/422.html +67 -0
- data/dummy/public/500.html +66 -0
- data/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/dummy/public/apple-touch-icon.png +0 -0
- data/dummy/public/favicon.ico +0 -0
- data/dummy/public/robots.txt +1 -0
- data/dummy/tmp/.keep +0 -0
- data/lib/generators/coffeescript/USAGE +3 -6
- data/lib/generators/coffeescript/coffeescript_generator.rb +6 -38
- data/lib/generators/coffeescript/templates/coffeescript.coffee.erb +5 -4
- data/lib/generators/controller/controller_generator.rb +4 -9
- data/lib/generators/sass/USAGE +3 -6
- data/lib/generators/sass/sass_generator.rb +4 -19
- data/lib/generators/sass/templates/sass.sass.erb +1 -1
- data/lib/orthodox/version.rb +1 -1
- data/orthodox.gemspec +3 -2
- metadata +85 -3
data/dummy/tmp/.keep
ADDED
File without changes
|
@@ -1,11 +1,8 @@
|
|
1
1
|
Description:
|
2
|
-
|
2
|
+
Generates a coffeescript file set up to write a new modular block
|
3
3
|
|
4
4
|
Example:
|
5
|
-
rails generate
|
5
|
+
rails generate coffeescript users load_all
|
6
6
|
|
7
7
|
This will create:
|
8
|
-
app/
|
9
|
-
app/views/users/new.html.slim
|
10
|
-
app/views/users/show.html.slim
|
11
|
-
app/views/users/index.html.slim
|
8
|
+
app/assets/javascripts/packs/_users.coffee (with a function named loadAll)
|
@@ -1,19 +1,16 @@
|
|
1
1
|
require 'rails/generators'
|
2
|
-
|
3
|
-
|
4
2
|
class CoffeescriptGenerator < Rails::Generators::NamedBase
|
5
3
|
|
6
|
-
|
7
4
|
source_root File.expand_path('../templates', __FILE__)
|
8
5
|
|
9
|
-
desc "This generator creates a coffee script file at
|
10
|
-
|
11
|
-
argument :functions, type: :array, default: [], banner: "functionOne functionTwo"
|
6
|
+
desc "This generator creates a coffee script file at"\
|
7
|
+
" app/assets/javascripts/partials"
|
12
8
|
|
9
|
+
argument :functions, type: :array, default: [],
|
10
|
+
banner: "functionOne functionTwo"
|
13
11
|
|
14
12
|
attr_reader :namespace
|
15
13
|
|
16
|
-
|
17
14
|
def copy_template_file
|
18
15
|
@namespace = class_name.split("::")
|
19
16
|
@namespace.pop
|
@@ -21,35 +18,21 @@ class CoffeescriptGenerator < Rails::Generators::NamedBase
|
|
21
18
|
template "coffeescript.coffee.erb", file_path
|
22
19
|
end
|
23
20
|
|
24
|
-
|
25
21
|
private
|
26
22
|
|
27
|
-
|
28
|
-
|
29
23
|
def function_name
|
30
24
|
file_name.camelize(:lower)
|
31
25
|
end
|
32
26
|
|
33
|
-
|
34
|
-
|
35
27
|
def partial_file_name
|
36
28
|
"_#{file_name}"
|
37
29
|
end
|
38
30
|
|
39
|
-
|
40
|
-
|
41
31
|
def file_path
|
42
|
-
Rails.root.join("app/assets/javascripts/
|
32
|
+
Rails.root.join("app/assets/javascripts/packs",
|
33
|
+
partial_file_name + ".coffee")
|
43
34
|
end
|
44
35
|
|
45
|
-
|
46
|
-
|
47
|
-
def template_file_path(temp_name)
|
48
|
-
Rails.root.join('app', 'views', namespace_path + file_name, temp_name + ".html.slim")
|
49
|
-
end
|
50
|
-
|
51
|
-
|
52
|
-
|
53
36
|
def namespace_path
|
54
37
|
if namespace.blank?
|
55
38
|
return ""
|
@@ -58,22 +41,7 @@ class CoffeescriptGenerator < Rails::Generators::NamedBase
|
|
58
41
|
end
|
59
42
|
end
|
60
43
|
|
61
|
-
|
62
|
-
|
63
44
|
def singular_name
|
64
45
|
super.singularize
|
65
46
|
end
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
# def authenticate_actor?
|
70
|
-
# options['authenticate'].present?
|
71
|
-
# end
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
# def authenticate_actor
|
76
|
-
# options['authenticate']
|
77
|
-
# end
|
78
|
-
|
79
47
|
end
|
@@ -1,14 +1,15 @@
|
|
1
|
-
|
1
|
+
window.<%= function_name %> = do ->
|
2
2
|
|
3
3
|
init = ->
|
4
4
|
# Write your code here...
|
5
5
|
|
6
6
|
<%- functions.each do |functionName| %>
|
7
|
-
<%= functionName %> = ->
|
7
|
+
<%= functionName.camelize(:lower) %> = ->
|
8
8
|
# Write your function here...
|
9
9
|
<%- end -%>
|
10
10
|
|
11
|
+
# Add any functions you'd like to make public here:
|
11
12
|
return { init }
|
12
|
-
)()
|
13
13
|
|
14
|
-
|
14
|
+
# Optionally: Call init on jQuery load
|
15
|
+
# jQuery <%= function_name %>.init
|
@@ -1,6 +1,4 @@
|
|
1
1
|
require 'rails/generators'
|
2
|
-
|
3
|
-
|
4
2
|
class ControllerGenerator < Rails::Generators::NamedBase
|
5
3
|
|
6
4
|
check_class_collision suffix: "Controller"
|
@@ -17,7 +15,6 @@ class ControllerGenerator < Rails::Generators::NamedBase
|
|
17
15
|
|
18
16
|
attr_reader :namespace
|
19
17
|
|
20
|
-
|
21
18
|
def copy_template_file
|
22
19
|
@namespace = class_name.split("::")
|
23
20
|
@namespace.pop
|
@@ -28,10 +25,8 @@ class ControllerGenerator < Rails::Generators::NamedBase
|
|
28
25
|
end
|
29
26
|
end
|
30
27
|
|
31
|
-
|
32
28
|
private
|
33
29
|
|
34
|
-
|
35
30
|
def create_flash_message
|
36
31
|
"Successfully created #{singular_name}"
|
37
32
|
end
|
@@ -44,13 +39,14 @@ class ControllerGenerator < Rails::Generators::NamedBase
|
|
44
39
|
"Successfully destroyed #{singular_name}"
|
45
40
|
end
|
46
41
|
|
47
|
-
|
48
42
|
def file_path
|
49
|
-
Rails.root.join('app', 'controllers',
|
43
|
+
Rails.root.join('app', 'controllers',
|
44
|
+
namespace_path + file_name + "_controller.rb")
|
50
45
|
end
|
51
46
|
|
52
47
|
def template_file_path(temp_name)
|
53
|
-
Rails.root.join('app', 'views', namespace_path + file_name,
|
48
|
+
Rails.root.join('app', 'views', namespace_path + file_name,
|
49
|
+
temp_name + ".html.slim")
|
54
50
|
end
|
55
51
|
|
56
52
|
def namespace_path
|
@@ -76,5 +72,4 @@ class ControllerGenerator < Rails::Generators::NamedBase
|
|
76
72
|
def authenticate_actor
|
77
73
|
options['authenticate']
|
78
74
|
end
|
79
|
-
|
80
75
|
end
|
data/lib/generators/sass/USAGE
CHANGED
@@ -1,11 +1,8 @@
|
|
1
1
|
Description:
|
2
|
-
|
2
|
+
Creates a new Sass block file
|
3
3
|
|
4
4
|
Example:
|
5
|
-
rails generate
|
5
|
+
rails generate sass users
|
6
6
|
|
7
7
|
This will create:
|
8
|
-
app/
|
9
|
-
app/views/users/new.html.slim
|
10
|
-
app/views/users/show.html.slim
|
11
|
-
app/views/users/index.html.slim
|
8
|
+
app/assets/styesheets/blocks/_users.sass
|
@@ -1,19 +1,15 @@
|
|
1
1
|
require 'rails/generators'
|
2
|
-
|
3
|
-
|
4
2
|
class SassGenerator < Rails::Generators::NamedBase
|
5
3
|
|
6
|
-
|
7
4
|
source_root File.expand_path('../templates', __FILE__)
|
8
5
|
|
9
|
-
desc "This generator creates a coffee script file at
|
6
|
+
desc "This generator creates a coffee script file at "\
|
7
|
+
"app/assets/stylesheets/partials"
|
10
8
|
|
11
9
|
argument :elements, type: :array, default: [], banner: "element element"
|
12
10
|
|
13
|
-
|
14
11
|
attr_reader :namespace
|
15
12
|
|
16
|
-
|
17
13
|
def copy_template_file
|
18
14
|
@namespace = class_name.split("::")
|
19
15
|
@namespace.pop
|
@@ -21,29 +17,21 @@ class SassGenerator < Rails::Generators::NamedBase
|
|
21
17
|
template "sass.sass.erb", file_path
|
22
18
|
end
|
23
19
|
|
24
|
-
|
25
20
|
private
|
26
21
|
|
27
|
-
|
28
|
-
|
29
22
|
def block_name
|
30
23
|
file_name.underscore
|
31
24
|
end
|
32
25
|
|
33
|
-
|
34
|
-
|
35
26
|
def partial_file_name
|
36
27
|
"_#{file_name}"
|
37
28
|
end
|
38
29
|
|
39
|
-
|
40
|
-
|
41
30
|
def file_path
|
42
|
-
Rails.root.join("app/assets/stylesheets/
|
31
|
+
Rails.root.join("app/assets/stylesheets/blocks",
|
32
|
+
partial_file_name + ".sass")
|
43
33
|
end
|
44
34
|
|
45
|
-
|
46
|
-
|
47
35
|
def namespace_path
|
48
36
|
if namespace.blank?
|
49
37
|
return ""
|
@@ -52,10 +40,7 @@ class SassGenerator < Rails::Generators::NamedBase
|
|
52
40
|
end
|
53
41
|
end
|
54
42
|
|
55
|
-
|
56
|
-
|
57
43
|
def singular_name
|
58
44
|
super.singularize
|
59
45
|
end
|
60
|
-
|
61
46
|
end
|
data/lib/orthodox/version.rb
CHANGED
data/orthodox.gemspec
CHANGED
@@ -21,8 +21,9 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.bindir = "exe"
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ["lib", 'lib/generators']
|
24
|
-
spec.
|
25
|
-
spec.
|
24
|
+
spec.add_runtime_dependency 'rails', '>= 3.0.0'
|
25
|
+
spec.add_runtime_dependency 'slim-rails'
|
26
26
|
spec.add_development_dependency "bundler", "~> 1.15"
|
27
27
|
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
+
spec.add_development_dependency "rails", ">= 5.0"
|
28
29
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: orthodox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bodacious
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-06-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -67,6 +67,20 @@ dependencies:
|
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '10.0'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: rails
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '5.0'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '5.0'
|
70
84
|
description: Replaces Rails generators with generators specific to Katana's workflow'
|
71
85
|
email:
|
72
86
|
- team@katanacode.com
|
@@ -81,6 +95,74 @@ files:
|
|
81
95
|
- Rakefile
|
82
96
|
- bin/console
|
83
97
|
- bin/setup
|
98
|
+
- dummy/.gitignore
|
99
|
+
- dummy/.ruby-version
|
100
|
+
- dummy/Gemfile
|
101
|
+
- dummy/Gemfile.lock
|
102
|
+
- dummy/README.md
|
103
|
+
- dummy/Rakefile
|
104
|
+
- dummy/app/assets/config/manifest.js
|
105
|
+
- dummy/app/assets/images/.keep
|
106
|
+
- dummy/app/assets/javascripts/application.js
|
107
|
+
- dummy/app/assets/javascripts/cable.js
|
108
|
+
- dummy/app/assets/javascripts/channels/.keep
|
109
|
+
- dummy/app/assets/stylesheets/application.css
|
110
|
+
- dummy/app/channels/application_cable/channel.rb
|
111
|
+
- dummy/app/channels/application_cable/connection.rb
|
112
|
+
- dummy/app/controllers/application_controller.rb
|
113
|
+
- dummy/app/controllers/concerns/.keep
|
114
|
+
- dummy/app/helpers/application_helper.rb
|
115
|
+
- dummy/app/jobs/application_job.rb
|
116
|
+
- dummy/app/mailers/application_mailer.rb
|
117
|
+
- dummy/app/models/application_record.rb
|
118
|
+
- dummy/app/models/concerns/.keep
|
119
|
+
- dummy/app/views/layouts/application.html.erb
|
120
|
+
- dummy/app/views/layouts/mailer.html.erb
|
121
|
+
- dummy/app/views/layouts/mailer.text.erb
|
122
|
+
- dummy/bin/bundle
|
123
|
+
- dummy/bin/rails
|
124
|
+
- dummy/bin/rake
|
125
|
+
- dummy/bin/setup
|
126
|
+
- dummy/bin/spring
|
127
|
+
- dummy/bin/update
|
128
|
+
- dummy/bin/yarn
|
129
|
+
- dummy/config.ru
|
130
|
+
- dummy/config/application.rb
|
131
|
+
- dummy/config/boot.rb
|
132
|
+
- dummy/config/cable.yml
|
133
|
+
- dummy/config/credentials.yml.enc
|
134
|
+
- dummy/config/database.yml
|
135
|
+
- dummy/config/environment.rb
|
136
|
+
- dummy/config/environments/development.rb
|
137
|
+
- dummy/config/environments/production.rb
|
138
|
+
- dummy/config/environments/test.rb
|
139
|
+
- dummy/config/initializers/application_controller_renderer.rb
|
140
|
+
- dummy/config/initializers/assets.rb
|
141
|
+
- dummy/config/initializers/backtrace_silencers.rb
|
142
|
+
- dummy/config/initializers/content_security_policy.rb
|
143
|
+
- dummy/config/initializers/cookies_serializer.rb
|
144
|
+
- dummy/config/initializers/filter_parameter_logging.rb
|
145
|
+
- dummy/config/initializers/inflections.rb
|
146
|
+
- dummy/config/initializers/mime_types.rb
|
147
|
+
- dummy/config/initializers/wrap_parameters.rb
|
148
|
+
- dummy/config/locales/en.yml
|
149
|
+
- dummy/config/puma.rb
|
150
|
+
- dummy/config/routes.rb
|
151
|
+
- dummy/config/spring.rb
|
152
|
+
- dummy/config/storage.yml
|
153
|
+
- dummy/db/seeds.rb
|
154
|
+
- dummy/lib/assets/.keep
|
155
|
+
- dummy/lib/tasks/.keep
|
156
|
+
- dummy/log/.keep
|
157
|
+
- dummy/package.json
|
158
|
+
- dummy/public/404.html
|
159
|
+
- dummy/public/422.html
|
160
|
+
- dummy/public/500.html
|
161
|
+
- dummy/public/apple-touch-icon-precomposed.png
|
162
|
+
- dummy/public/apple-touch-icon.png
|
163
|
+
- dummy/public/favicon.ico
|
164
|
+
- dummy/public/robots.txt
|
165
|
+
- dummy/tmp/.keep
|
84
166
|
- lib/generators/coffeescript/USAGE
|
85
167
|
- lib/generators/coffeescript/coffeescript_generator.rb
|
86
168
|
- lib/generators/coffeescript/templates/coffeescript.coffee.erb
|
@@ -117,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
199
|
version: '0'
|
118
200
|
requirements: []
|
119
201
|
rubyforge_project:
|
120
|
-
rubygems_version: 2.7.
|
202
|
+
rubygems_version: 2.7.6
|
121
203
|
signing_key:
|
122
204
|
specification_version: 4
|
123
205
|
summary: Better Rails generators for Katana
|