common_core_js 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 944f8bb60dd7454749b17dfb671d4c4eee78dea8511674ee15c9f12aed759fd8
4
- data.tar.gz: 412fa01b88bb1747100fb3a81ceb3f0aee9b19fa606168475d48738a8a8d879b
3
+ metadata.gz: 2219c80f29355076e17de37d99966e7b491aa09f255a911ec907b32a983bfa1c
4
+ data.tar.gz: 00dab2e16fc5145aff949648dcdddd60993aa99862b18319117d521c9ab78b16
5
5
  SHA512:
6
- metadata.gz: 6f03ba9c9154c8cdaea309c2458ef24a9270a0533415fe0cc4a7ac0c69f45f87936e0e09a3277fd185e163f5cbba37ff15e54f496c80a3a29217fd8cb945dfc6
7
- data.tar.gz: ae43c5c4c7c26791a259194dd4c93b8ca3cc65659114a39d2099285c36d3f3b849b654b029cffc60f743b07af1856d50a7dd1acec6ae92db0b62e7e093d0db62
6
+ metadata.gz: 731c8e6ef809fcade1810f67a389606f0abb62a58fe54dfcb8baa6a6b741986511cc0df2a180f390a4b55c3aee52682b91a2a64902629ac2b4fef57ef7d737a3
7
+ data.tar.gz: 5a34083277277efbf9b4ef9ed7a949156489d4fbc71a14b00105ff0a169ff9a0b469e6b2ceb90a8727d86fc6f8a3ff2ac3291aeac9aaf45f650fd098fb1e9b50
@@ -47,6 +47,7 @@ Gem::Specification.new do |spec|
47
47
  spec.add_runtime_dependency 'bootsnap'
48
48
  spec.add_runtime_dependency 'bootstrap'
49
49
  spec.add_runtime_dependency 'font-awesome-rails'
50
+ spec.add_dependency 'ffaker'
50
51
 
51
52
  spec.post_install_message = <<~MSG
52
53
  ---------------------------------------------
@@ -1,3 +1,3 @@
1
1
  module CommonCoreJs
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
@@ -1,8 +1,6 @@
1
1
  Description:
2
- Explain the generator
2
+ Generate a controller, view files, and spec
3
3
 
4
4
  Example:
5
- rails generate common_core_scaffold Thing
5
+ rails generate common_core:scaffold Thing
6
6
 
7
- This will create:
8
- what/will/it/create
@@ -0,0 +1,23 @@
1
+ require 'rails/generators/erb/scaffold/scaffold_generator'
2
+ require 'ffaker'
3
+
4
+ module CommonCore
5
+ class InstallGenerator < Rails::Generators::Base
6
+ hook_for :form_builder, :as => :scaffold
7
+
8
+ source_root File.expand_path('templates', __dir__)
9
+
10
+
11
+ def initialize(*args) #:nodoc:
12
+ super
13
+
14
+ copy_file "common_core.js", "vendor/assets/javascripts/common_core.js"
15
+ copy_file "common_core.scss", "vendor/assets/stylesheets/common_core.scss"
16
+
17
+ end
18
+
19
+ end
20
+ end
21
+
22
+
23
+
@@ -1,4 +1,5 @@
1
1
  require 'rails/generators/erb/scaffold/scaffold_generator'
2
+ require 'ffaker'
2
3
 
3
4
  module CommonCore
4
5
  class ScaffoldGenerator < Erb::Generators::ScaffoldGenerator
@@ -1,7 +1,7 @@
1
1
 
2
2
  require("jquery")
3
3
  console.log("loading common core...")
4
- debugger
4
+
5
5
  $(function(){
6
6
  // always pass csrf tokens on ajax calls
7
7
  $.ajaxSetup({
@@ -2,7 +2,7 @@ require 'rails_helper'
2
2
 
3
3
  describe <%= controller_class_name %> do
4
4
  render_views
5
- let(:<%= @auth %>) {create(:<%= @auth.gsub('current_', '') %>)}
5
+ <% unless @auth.nil? %> let(:<%= @auth %>) {create(:<%= @auth.gsub('current_', '') %>)}<%end%>
6
6
  let(:<%= singular %>) {create(:<%= singular %><%= object_parent_mapping_as_argument_for_specs %> )}
7
7
 
8
8
  <%= objest_nest_factory_setup %>
@@ -1,4 +1,7 @@
1
- # desc "Explaining what the task does"
2
- # task :common_core_js do
3
- # # Task goes here
4
- # end
1
+ namespace :common_core do
2
+ desc "install"
3
+
4
+ task install: :environment do
5
+ puts "please run rails generate common_core:install"
6
+ end
7
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: common_core_js
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Fleetwood-Boldt
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: ffaker
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
111
125
  description: Simple, plug & play Rails scaffolding with really simple Javascript
112
126
  email: jason.fb@datatravels.com
113
127
  executables: []
@@ -129,7 +143,6 @@ files:
129
143
  - app/assets/stylesheets/common_core_js/common_core.scss
130
144
  - app/controllers/common_core_js/application_controller.rb
131
145
  - app/helpers/common_core_js/application_helper.rb
132
- - app/javascript/common_core/xyz.js
133
146
  - app/jobs/common_core_js/application_job.rb
134
147
  - app/mailers/common_core_js/application_mailer.rb
135
148
  - app/models/common_core_js/application_record.rb
@@ -153,6 +166,7 @@ files:
153
166
  - lib/generators/.DS_Store
154
167
  - lib/generators/common_core/USAGE
155
168
  - lib/generators/common_core/erb/scaffold/common_core_scaffold_generator.rb
169
+ - lib/generators/common_core/install_generator.rb
156
170
  - lib/generators/common_core/scaffold_generator.rb
157
171
  - lib/generators/common_core/templates/_edit.haml
158
172
  - lib/generators/common_core/templates/_form.haml
@@ -160,6 +174,8 @@ files:
160
174
  - lib/generators/common_core/templates/_list.haml
161
175
  - lib/generators/common_core/templates/_new.haml
162
176
  - lib/generators/common_core/templates/all.haml
177
+ - lib/generators/common_core/templates/common_core.js
178
+ - lib/generators/common_core/templates/common_core.scss
163
179
  - lib/generators/common_core/templates/controller.rb
164
180
  - lib/generators/common_core/templates/controller_spec.rb
165
181
  - lib/generators/common_core/templates/create.js.erb
@@ -169,7 +185,6 @@ files:
169
185
  - lib/generators/common_core/templates/new.js.erb
170
186
  - lib/generators/common_core/templates/update.js.erb
171
187
  - lib/tasks/common_core_js_tasks.rake
172
- - vendor/assets/stylesheets/common_core_js.scss
173
188
  homepage: https://blog.jasonfleetwoodboldt.com/common-core-js/
174
189
  licenses:
175
190
  - MIT