uniformity 0.9.1 → 1.0.0

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: 6325871e4b59fc6e39a339ef1c4585e232a276b2980354d27c289101fcd18d0f
4
- data.tar.gz: 9719e37137ac22aba6e82a8c264771c730814e590abba3a10bc90eada80358f1
3
+ metadata.gz: e529aceeb6be9703303e476a02dfc2669e58787533bc8fc2328a6b014c81c805
4
+ data.tar.gz: 5e59c5ede5c02b0a9a1442f4c9330060397eade2d96869155eaaece7d2e43f29
5
5
  SHA512:
6
- metadata.gz: 7976df0acd9c3ba8926ac1058ef1795a94b0c1e8c4b6508007baeadad61aae060921eab437a31aa7278e7364170eda4c90fe2097e9b5413675714380253344b1
7
- data.tar.gz: da9e0e607a999953d9034a4c29d3a5581feac06d55176ac63948077d1876bfd4a69aad00de4b5b2acba2f64928b55cd0202b9d0ce14d9cae1cd0243ea178293f
6
+ metadata.gz: 9a85d3887042b4dee425404d75fefd4e4c9ec2558a2a3b641f7fc71ee4cfdb392e5f2bfd2662a06ac105dd46199563365b1bab886d1af52056efc190360f531f
7
+ data.tar.gz: 8cecf107ba6e5036a927bf2b2f1f5afcf172e8bdb7022215843493ceae82f8aa5d9e0f83d141307ccba870e49c43f209efc387009d6dde6255a4fd005c617d86
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- uniformity (0.9.1)
4
+ uniformity (1.0.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -32,4 +32,4 @@ DEPENDENCIES
32
32
  uniformity!
33
33
 
34
34
  BUNDLED WITH
35
- 2.0.2
35
+ 2.1.4
@@ -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 = ["Joost Baaij"]
11
- s.email = ["joost@spacebabies.nl"]
12
- s.homepage = "https://www.spacebabies.nl/"
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
- begin
2
- require 'bundler/setup'
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("../test/dummy/Rakefile", __FILE__)
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 .
@@ -1,6 +1,6 @@
1
1
  module <%= application_const_base %>
2
2
  module <%= class_name %>
3
- class ApplicationController < ActionController::Base
3
+ class ApplicationController < ::ApplicationController
4
4
  end
5
5
  end
6
6
  end
@@ -1,7 +1,6 @@
1
1
  module <%= application_const_base %>
2
2
  module <%= class_name %>
3
3
  class ApplicationJob < ActiveJob::Base
4
- self.abstract_class = true
5
4
  end
6
5
  end
7
6
  end
@@ -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
@@ -1,3 +1,5 @@
1
1
  <%= application_const_base %>::<%= class_name %>::Engine.routes.draw do
2
- post 'webhooks/bounce', to: 'webhooks#bounce'
2
+ namespace :webhooks do
3
+ post :hook1, to: 'events#hook1'
4
+ end
3
5
  end
@@ -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
- # Allow configuration to be stored for this engine.
10
- def configure
11
- self.configuration ||= Configuration.new
12
- yield(configuration)
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
- # e.g. Credentials to connect with their API.
16
- # Defaults to looking up the values in ENV.
17
- def credentials
18
- @credentials ||= Credentials.new(
19
- ENV['<%= application_name.upcase %>_<%= singular_name.upcase %>_KEY'],
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|
@@ -1,3 +1,3 @@
1
1
  module Uniformity
2
- VERSION = "0.9.1"
2
+ VERSION = "1.0.0"
3
3
  end
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.9.1
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-04-16 00:00:00.000000000 Z
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
- rubyforge_project:
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.
@@ -1,9 +0,0 @@
1
- require_dependency '<%= application_name %>/<%= singular_name %>/application_job'
2
-
3
- module <%= application_const_base %>
4
- module <%= class_name %>
5
- class HelloWorldJob < ApplicationJob
6
- self.abstract_class = true
7
- end
8
- end
9
- end