stimpack 0.5.0 → 0.6.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: 4ca6d661bee358381b9fc2fc2b40b9208c52ebc279cada30b1f8cd8d416b257e
4
- data.tar.gz: 03f9fa4999c375228668a02d25712c11bc904a9e41f77f3ef4298127f9c814b4
3
+ metadata.gz: e6ad8e03da3ba828985b82eccb3840f6f4122d5fe38bcbc7905734a566c7d4cc
4
+ data.tar.gz: cba30db4834bd3e056ea19c76067945d73378c799b603f1cc931d43ac409cf59
5
5
  SHA512:
6
- metadata.gz: 6744c141fc73982fda1713198e1b6ad78971167eb7546b4be64702210b0289aa15a037fbdfa5f547e9ca732ed830d5c376710e7d365276640139af31cdb05321
7
- data.tar.gz: 1fac57fcffcaefcf08b54c20750db09732ba565f41d76ce6fc81ce5eb1b1a696364389ebf7377820bdc437527ee20d5b093a096bcae53b0d8af9e85af9d56e13
6
+ metadata.gz: d38f3c326b2fa6f327de5b0d2da6e77c1ea58e54c28df8e51887247743699ad3f8cc5e4dc5f769c50eaa80011a6ee8374fd21c4173e3c5c0b59a26ebb9609f82
7
+ data.tar.gz: 20bd2048490efd0eaa00380263c31c98e1eededa46458e61195c62b4f2c2f4102db1f080eb03efaf3f9496bd5d1777ec06f48109d1cf2dab52332900e41cde98
data/bin/tapioca ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'tapioca' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("tapioca", "tapioca")
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "yaml"
4
+
3
5
  module Stimpack
4
6
  class Pack
5
7
  class Configuration
@@ -17,7 +19,11 @@ module Stimpack
17
19
  private
18
20
 
19
21
  def data
20
- @data ||= YAML.load_file(@path).fetch(KEY, {}).freeze
22
+ @data ||= begin
23
+ contents = YAML.respond_to?(:safe_load_file) ? YAML.safe_load_file(@path) : YAML.load_file(@path)
24
+ contents ||= {}
25
+ contents.fetch(KEY, {}).freeze
26
+ end
21
27
  end
22
28
  end
23
29
  end
@@ -12,8 +12,9 @@ module Stimpack
12
12
  end
13
13
 
14
14
  def resolve
15
- # Gather all the packs under the root directory and create packs.
16
- root.children.select(&:directory?).sort!.each do |path|
15
+ # Gather all the parent packs and the children packs.
16
+ package_locations = root.glob('*/{package.yml,*/package.yml}').map(&:dirname)
17
+ package_locations.sort!.each do |path|
17
18
  next unless pack = Pack.create(path)
18
19
  @packs[pack.name] = pack
19
20
  end
@@ -4,6 +4,8 @@ module Stimpack
4
4
  class Railtie < Rails::Railtie
5
5
  config.before_configuration do |app|
6
6
  Stimpack.load(app)
7
+ # This is not used within stimpack. Rather, this allows OTHER tools to
8
+ # hook into Stimpack via ActiveSupport hooks.
7
9
  ActiveSupport.run_load_hooks(:stimpack, Packs)
8
10
  end
9
11
  end
@@ -1,3 +1,3 @@
1
1
  module Stimpack
2
- VERSION = "0.5.0".freeze
2
+ VERSION = "0.6.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stimpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ngan Pham
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-07-26 00:00:00.000000000 Z
11
+ date: 2022-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -52,6 +52,48 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: debug
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: sorbet
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: tapioca
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
55
97
  description: stimpack establishes and implements a set of conventions for splitting
56
98
  up large monoliths.
57
99
  email:
@@ -63,6 +105,7 @@ files:
63
105
  - README.md
64
106
  - bin/console
65
107
  - bin/setup
108
+ - bin/tapioca
66
109
  - lib/stimpack.rb
67
110
  - lib/stimpack/integrations.rb
68
111
  - lib/stimpack/integrations/factory_bot.rb
@@ -80,7 +123,7 @@ metadata:
80
123
  homepage_uri: https://github.com/Gusto/stimpack
81
124
  source_code_uri: https://github.com/Gusto/stimpack
82
125
  changelog_uri: https://github.com/Gusto/stimpack/blob/master/CHANGELOG.md
83
- post_install_message:
126
+ post_install_message:
84
127
  rdoc_options: []
85
128
  require_paths:
86
129
  - lib
@@ -95,8 +138,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
138
  - !ruby/object:Gem::Version
96
139
  version: '0'
97
140
  requirements: []
98
- rubygems_version: 3.2.32
99
- signing_key:
141
+ rubygems_version: 3.3.7
142
+ signing_key:
100
143
  specification_version: 4
101
144
  summary: A Rails helper to package your code.
102
145
  test_files: []