niaga-ghost 0.1.1 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3f635d00c8f99bfa4fbd522f20fbb9f60011a26a2f9f6253418c62601128a525
4
- data.tar.gz: f14a4ac6c5979e2e97381ca0dfd69197f041ab052f15254d544c6cebcc640f2d
3
+ metadata.gz: b0a9ff866dd2ebd6e68790e50c11c570856d8289779f39c4a7b55d401ecc8d8f
4
+ data.tar.gz: 6c8236c3d05eb34984fc5df7f321b40519c4d9a9015b6891c05533e8d9fc626f
5
5
  SHA512:
6
- metadata.gz: '098d0cf65c2ad009f217dc5d7f5ce838fd26f5c9834000a121870fa231fb05989f32a7452dbf995472b4e0382eee63eb06b6b6a3586d2ae79c7a2b21f38671e2'
7
- data.tar.gz: 59d3c2db2463dda8e9f961adebeb745b1334245add7c0a146eddc371e24b48f7443f0d1af04d7c2585b4e077738508c15215e3e54558eb6ab037864b17ff7b4d
6
+ metadata.gz: 9b00073d191edf3bdeea6fc769a3bda157e07c34169db106aec4af27cd164d5678587e6cf01925aec7123d20774950e4be46b48153613a517f59fe920e8a6f7c
7
+ data.tar.gz: 1712a1e8458604e7c808c0dac60ad32bf3049bc816a55f94c831cb5a86962f4710e932f44eb4449483797a55bbc4436720bea04ce4758068197b92a09d4073d6
@@ -1,9 +1,11 @@
1
1
  require "rails/generators"
2
2
 
3
- module Ghost
4
- class GhostGenerator < ::Rails::Generators::NamedBase # rubocop:disable Style/Documentation
3
+ module NiagaGhost
4
+ class NiagaGhostGenerator < ::Rails::Generators::NamedBase # rubocop:disable Style/Documentation
5
5
  source_root File.expand_path("templates", __dir__)
6
6
 
7
+ desc "Generates a resolver in app/models/resolvers"
8
+
7
9
  def create_ghost_resolver
8
10
  template "resolver.rb", "app/models/resolvers/#{file_name}_resolver.rb"
9
11
  end
@@ -1,4 +1,4 @@
1
- module Ghost
1
+ module NiagaGhost
2
2
  module ClassMethods
3
3
  def has_delegate(name, **opts)
4
4
  resolver = Resolver.build(name, opts)
@@ -1,8 +1,8 @@
1
1
  require "rails/railtie"
2
2
 
3
- module Ghost
3
+ module NiagaGhost
4
4
  class Railtie < ::Rails::Railtie # rubocop:disable Style/Documentation
5
- initializer "ghost/active_record" do
5
+ initializer "ghost.extensions" do
6
6
  ActiveSupport.on_load(:active_record) do
7
7
  include Ghost
8
8
  end
@@ -1,4 +1,4 @@
1
- module Ghost
1
+ module NiagaGhost
2
2
  # The Reflection class defines ghost accessor methods on Ruby classes
3
3
  # to simulate virtual (fake) associations.
4
4
  #
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module NiagaGhost
4
+ VERSION = "0.1.3"
5
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "niaga-ghost/reflection"
4
+ require "niaga-ghost/niaga_ghost"
5
+
6
+ require "niaga-ghost/version"
7
+ require "niaga-ghost/railtie" if defined?(::Rails)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: niaga-ghost
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - azman abdullah
@@ -21,14 +21,14 @@ files:
21
21
  - CHANGELOG.md
22
22
  - LICENSE.txt
23
23
  - README.md
24
- - lib/generators/ghost/ghost_generator.rb
25
- - lib/generators/ghost/templates/model.rb
26
- - lib/generators/ghost/templates/resolver.rb
27
- - lib/ghost.rb
28
- - lib/ghost/ghost.rb
29
- - lib/ghost/railtie.rb
30
- - lib/ghost/reflection.rb
31
- - lib/ghost/version.rb
24
+ - lib/generators/generator.rb
25
+ - lib/generators/templates/model.rb
26
+ - lib/generators/templates/resolver.rb
27
+ - lib/niaga-ghost/niaga_ghost.rb
28
+ - lib/niaga-ghost/railtie.rb
29
+ - lib/niaga-ghost/reflection.rb
30
+ - lib/niaga-ghost/version.rb
31
+ - lib/niaga_ghost.rb
32
32
  homepage: https://github.com/Maluku-Niaga/ghost.
33
33
  licenses:
34
34
  - MIT
data/lib/ghost/version.rb DELETED
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Ghost
4
- VERSION = "0.1.1"
5
- end
data/lib/ghost.rb DELETED
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "ghost/reflection"
4
- require "ghost/ghost"
5
-
6
- require "ghost/version"
7
- require "ghost/railtie" if defined?(::Rails)