uniformity 0.9.1 → 1.0.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/Gemfile.lock +2 -2
- data/lib/generators/uniformity/templates/engine_root/%application_name%-%singular_name%.gemspec.tt +9 -7
- data/lib/generators/uniformity/templates/engine_root/Rakefile.tt +4 -12
- data/lib/generators/uniformity/templates/engine_root/app/assets/javascripts/%application_name%/%singular_name%/application.js.tt +13 -0
- data/lib/generators/uniformity/templates/engine_root/app/controllers/%application_name%/%singular_name%/application_controller.rb.tt +1 -1
- data/lib/generators/uniformity/templates/engine_root/app/jobs/%application_name%/%singular_name%/application_job.rb.tt +0 -1
- data/lib/generators/uniformity/templates/engine_root/app/serializers/%application_name%/%singular_name%/application_serializer.rb.tt +19 -0
- data/lib/generators/uniformity/templates/engine_root/config/routes.rb.tt +3 -1
- data/lib/generators/uniformity/templates/engine_root/lib/%application_name%/%singular_name%.rb.tt +5 -5
- data/lib/generators/uniformity/templates/engine_root/lib/%application_name%/%singular_name%/configuration.rb.tt +5 -7
- data/lib/generators/uniformity/templates/engine_root/lib/%application_name%/%singular_name%/engine.rb.tt +2 -2
- data/lib/uniformity/version.rb +1 -1
- metadata +5 -5
- data/lib/generators/uniformity/templates/engine_root/app/jobs/%application_name%/%singular_name%/hello_world_job.rb.tt +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e529aceeb6be9703303e476a02dfc2669e58787533bc8fc2328a6b014c81c805
|
4
|
+
data.tar.gz: 5e59c5ede5c02b0a9a1442f4c9330060397eade2d96869155eaaece7d2e43f29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a85d3887042b4dee425404d75fefd4e4c9ec2558a2a3b641f7fc71ee4cfdb392e5f2bfd2662a06ac105dd46199563365b1bab886d1af52056efc190360f531f
|
7
|
+
data.tar.gz: 8cecf107ba6e5036a927bf2b2f1f5afcf172e8bdb7022215843493ceae82f8aa5d9e0f83d141307ccba870e49c43f209efc387009d6dde6255a4fd005c617d86
|
data/Gemfile.lock
CHANGED
data/lib/generators/uniformity/templates/engine_root/%application_name%-%singular_name%.gemspec.tt
CHANGED
@@ -7,14 +7,16 @@ require "<%= application_name %>/<%= singular_name %>/version"
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "<%= application_name %>-<%= singular_name %>"
|
9
9
|
s.version = <%= application_const_base %>::<%= class_name %>::VERSION
|
10
|
-
s.authors = ["
|
11
|
-
s.email = ["
|
12
|
-
s.homepage = "https://www.
|
13
|
-
s.summary = "Engine to connect <%= application_const_base %> to <%= class_name %>"
|
14
|
-
s.description = "Engine to connect <%= application_const_base %> to <%= class_name %>"
|
10
|
+
# s.authors = ["Example Name"]
|
11
|
+
# s.email = ["name@example.com"]
|
12
|
+
# s.homepage = "https://www.example.com/"
|
13
|
+
s.summary = "Rails Engine to connect <%= application_const_base %> to <%= class_name %>"
|
14
|
+
s.description = "Rails Engine to connect <%= application_const_base %> to <%= class_name %>"
|
15
15
|
|
16
|
-
s.files = Dir["{app,config,db,lib}/**/*", "Rakefile", "README.md"]
|
16
|
+
s.files = Dir["{app,bin,config,db,lib}/**/*", "Rakefile", "README.md"]
|
17
17
|
|
18
|
-
# add your gem dependencies here
|
19
18
|
s.add_dependency "rails"
|
19
|
+
|
20
|
+
# add your gem dependencies here
|
21
|
+
# s.add_dependency "<%= singular_name %>"
|
20
22
|
end
|
@@ -1,8 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
rescue LoadError
|
4
|
-
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
-
end
|
1
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
2
|
+
require "bundler/setup" if File.exist?(ENV['BUNDLE_GEMFILE'])
|
6
3
|
|
7
4
|
require 'rdoc/task'
|
8
5
|
|
@@ -14,16 +11,12 @@ RDoc::Task.new(:rdoc) do |rdoc|
|
|
14
11
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
12
|
end
|
16
13
|
|
17
|
-
APP_RAKEFILE = File.expand_path(
|
18
|
-
load 'rails/tasks/engine.rake'
|
19
|
-
|
14
|
+
APP_RAKEFILE = File.expand_path('../../../Rakefile', __FILE__)
|
20
15
|
|
16
|
+
load 'rails/tasks/engine.rake'
|
21
17
|
load 'rails/tasks/statistics.rake'
|
22
18
|
|
23
|
-
|
24
|
-
|
25
19
|
require 'bundler/gem_tasks'
|
26
|
-
|
27
20
|
require 'rake/testtask'
|
28
21
|
|
29
22
|
Rake::TestTask.new(:test) do |t|
|
@@ -32,5 +25,4 @@ Rake::TestTask.new(:test) do |t|
|
|
32
25
|
t.verbose = false
|
33
26
|
end
|
34
27
|
|
35
|
-
|
36
28
|
task default: :test
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below. To include this in the main app:
|
3
|
+
// //= require <%= application_name %>/<%= singular_name %>/application
|
4
|
+
//
|
5
|
+
// Any JavaScript/Coffee file within this directory can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file. JavaScript code in this file should be added after the last require_* statement.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require_tree .
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module <%= application_const_base %>
|
2
|
+
module <%= class_name %>
|
3
|
+
# Gives you:
|
4
|
+
# serializable_hash
|
5
|
+
# as_json
|
6
|
+
# to_json (string representation)
|
7
|
+
class ApplicationSerializer
|
8
|
+
include ActiveModel::Serializers::JSON
|
9
|
+
|
10
|
+
attr_accessor :name
|
11
|
+
|
12
|
+
def attributes
|
13
|
+
{
|
14
|
+
'name' => nil
|
15
|
+
}
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/generators/uniformity/templates/engine_root/lib/%application_name%/%singular_name%.rb.tt
CHANGED
@@ -5,12 +5,12 @@ module <%= application_const_base %>
|
|
5
5
|
module <%= class_name %>
|
6
6
|
class << self
|
7
7
|
attr_accessor :configuration
|
8
|
+
end
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
end
|
10
|
+
# Allow configuration to be stored for this engine.
|
11
|
+
def self.configure
|
12
|
+
self.configuration ||= Configuration.new
|
13
|
+
yield(configuration)
|
14
14
|
end
|
15
15
|
|
16
16
|
def self.engine
|
@@ -12,13 +12,11 @@ module <%= application_const_base %>
|
|
12
12
|
#
|
13
13
|
# The value can be accessed with <%= application_const_base %>::<%= class_name %>.configuration.<setting>.
|
14
14
|
class Configuration
|
15
|
-
|
16
|
-
|
17
|
-
def
|
18
|
-
@
|
19
|
-
|
20
|
-
ENV['<%= application_name.upcase %>_<%= singular_name.upcase %>_SECRET']
|
21
|
-
)
|
15
|
+
attr_accessor :setting_1, :setting_2
|
16
|
+
|
17
|
+
def initialize
|
18
|
+
@setting_1 = ENV['<%= application_name.upcase %>_<%= singular_name.upcase %>_SETTING_1']
|
19
|
+
@setting_2 = ENV['<%= application_name.upcase %>_<%= singular_name.upcase %>_SETTING_2']
|
22
20
|
end
|
23
21
|
end
|
24
22
|
end
|
@@ -8,8 +8,8 @@ module <%= application_const_base %>
|
|
8
8
|
config.autoload_paths << File.expand_path('lib', __dir__)
|
9
9
|
|
10
10
|
config.generators do |g|
|
11
|
-
g.test_framework :rspec
|
12
|
-
g.fixture_replacement :factory_bot, dir: 'spec/factories'
|
11
|
+
# g.test_framework :rspec
|
12
|
+
# g.fixture_replacement :factory_bot, dir: 'spec/factories'
|
13
13
|
end
|
14
14
|
|
15
15
|
config.after_initialize do |app|
|
data/lib/uniformity/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uniformity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joost Baaij
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -77,13 +77,14 @@ files:
|
|
77
77
|
- lib/generators/uniformity/templates/engine_root/README.md.tt
|
78
78
|
- lib/generators/uniformity/templates/engine_root/Rakefile.tt
|
79
79
|
- lib/generators/uniformity/templates/engine_root/app/assets/images/%application_name%/%singular_name%/.gitkeep
|
80
|
+
- lib/generators/uniformity/templates/engine_root/app/assets/javascripts/%application_name%/%singular_name%/application.js.tt
|
80
81
|
- lib/generators/uniformity/templates/engine_root/app/assets/stylesheets/%application_name%/%singular_name%/application.scss.tt
|
81
82
|
- lib/generators/uniformity/templates/engine_root/app/controllers/%application_name%/%singular_name%/application_controller.rb.tt
|
82
83
|
- lib/generators/uniformity/templates/engine_root/app/controllers/%application_name%/%singular_name%/webhooks_controller.rb.tt
|
83
84
|
- lib/generators/uniformity/templates/engine_root/app/jobs/%application_name%/%singular_name%/application_job.rb.tt
|
84
|
-
- lib/generators/uniformity/templates/engine_root/app/jobs/%application_name%/%singular_name%/hello_world_job.rb.tt
|
85
85
|
- lib/generators/uniformity/templates/engine_root/app/mailers/%application_name%/%singular_name%/mailer.rb.tt
|
86
86
|
- lib/generators/uniformity/templates/engine_root/app/models/%application_name%/%singular_name%/application_record.rb.tt
|
87
|
+
- lib/generators/uniformity/templates/engine_root/app/serializers/%application_name%/%singular_name%/application_serializer.rb.tt
|
87
88
|
- lib/generators/uniformity/templates/engine_root/app/views/%application_name%/%singular_name%/.gitkeep
|
88
89
|
- lib/generators/uniformity/templates/engine_root/bin/console.tt
|
89
90
|
- lib/generators/uniformity/templates/engine_root/bin/rails.tt
|
@@ -117,8 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
118
|
- !ruby/object:Gem::Version
|
118
119
|
version: '0'
|
119
120
|
requirements: []
|
120
|
-
|
121
|
-
rubygems_version: 2.7.7
|
121
|
+
rubygems_version: 3.0.1
|
122
122
|
signing_key:
|
123
123
|
specification_version: 4
|
124
124
|
summary: Wrap external services in a uniform package.
|