pakyow-support 1.0.1 → 1.0.2

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: e9e987aa91d0a15f1c799ed5b41e37c6757f82f9920a5eee68b553a33c577eaa
4
- data.tar.gz: d7691434abb486da61c6e65d7dee545e85195ed42dc1bcf7a6c9cd73e33c90d8
3
+ metadata.gz: 769e1cff2257abd2c9df32717dc5df46207bbb7e88a05daed9fb6a92e8ac7e42
4
+ data.tar.gz: 1df9a64688f38a9a8630797aea6a14cf81f0e89b3bcf0e00f900aae225055d63
5
5
  SHA512:
6
- metadata.gz: 5e8da7fe59c931536d82635347db3ce54d05477f85ef03e8fbe48229222769a81c61be7337dcafdfa5691479ebec95f39f842d69b8e422fa4dd7081b50233a72
7
- data.tar.gz: 7960b63c41ce6ecfd8f4b48465857d2ef9b8523ef41af356bfe353c8aa1d778582f537ac42ab70ab81f6c0e0d8b038af998d651684d9adda6d4372a0edaeda72
6
+ metadata.gz: d72b3bee48f8ae13b4534469352643e9e2aafe93ac3050d5e3a0639a1ea1fe228e0f0effd86698648b3a5ac798b612ec7d9316025ff38de8f66965099e070fc7
7
+ data.tar.gz: 2beac1964e1bf996902b9cf57b7293ea3203b2dcab8f352056d85305d77c7a56fb48cd619fd8ed490a55d89211d3fc1b6ee149a1d629aa5b9e5223eec2fcb15f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
- # UNRELEASED
1
+ # v1.0.2 (unreleased)
2
2
 
3
- # 1.0
3
+ * `fix` **Message verification no longer fails when the digest contains `--`.**
4
+
5
+ *Related links:*
6
+ - [Pull Request #316][pr-316]
7
+
8
+ * `fix` **Avoid including the initializer for configurable modules.**
9
+
10
+ *Related links:*
11
+ - [Pull Request #312][pr-312]
12
+
13
+ * `fix` **Methods defined an an app block are now defined in the correct context.**
14
+
15
+ *Related links:*
16
+ - [Commit 62112dc][62112dc]
17
+ - [Commit f7591d4][f7591d4]
18
+
19
+ * `fix` **Named actions can now share a name with a method on the pipelined object.**
20
+
21
+ *Related links:*
22
+ - [Pull Request #297][pr-297]
23
+ - [Commit fe1f554][fe1f554]
24
+
25
+ [pr-316]: https://github.com/pakyow/pakyow/pull/316/commits
26
+ [pr-312]: https://github.com/pakyow/pakyow/pull/312/commits
27
+ [pr-297]: https://github.com/pakyow/pakyow/pull/297/commits
28
+ [f7591d4]: https://github.com/pakyow/pakyow/commit/f7591d406fd87c04eee3ee036da6a780188971b6
29
+ [62112dc]: https://github.com/pakyow/pakyow/commit/62112dc1396e397fda73e92df780c4358e28a3fa
30
+ [fe1f554]: https://github.com/pakyow/pakyow/commit/fe1f554b56a4c22298f8c2b7809519a9b8eb220b
31
+
32
+ # v1.0.0
4
33
 
5
34
  * Hello, Web
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "forwardable"
4
+
3
5
  require "concurrent/hash"
4
6
 
5
7
  require "pakyow/support/class_state"
@@ -46,7 +48,10 @@ module Pakyow
46
48
  base.class_state :__config, default: Config.new(base), inheritable: true
47
49
  base.class_state :__config_environments, default: Concurrent::Hash.new, inheritable: true
48
50
 
49
- base.prepend Initializer
51
+ unless base.instance_of?(Module)
52
+ base.prepend Initializer
53
+ end
54
+
50
55
  base.include CommonMethods
51
56
  base.extend ClassMethods, CommonMethods
52
57
  end
@@ -138,7 +138,7 @@ module Pakyow
138
138
  # Define state for the object.
139
139
  #
140
140
  def define(&block)
141
- instance_eval(&block)
141
+ class_exec(&block)
142
142
  end
143
143
  end
144
144
 
@@ -6,21 +6,55 @@ module Pakyow
6
6
  module Dependencies
7
7
  extend self
8
8
 
9
- LOCAL_FRAMEWORK_PATH = File.expand_path("../../../../../", __FILE__)
9
+ def self.bundler_gem_path
10
+ @bundler_gem_path ||= Bundler.bundle_path.to_s + "/bundler/gems"
11
+ end
12
+
13
+ def self.local_framework_path
14
+ @local_framework_path ||= File.expand_path("../../../../../", __FILE__)
15
+ end
16
+
17
+ def self.ruby_gem_path
18
+ @ruby_gem_path ||= File.join(Gem.dir, "/gems")
19
+ end
20
+
21
+ def self.regex_bundler
22
+ @regex_bundler ||= /^#{Dependencies.bundler_gem_path}\//
23
+ end
24
+
25
+ def self.regex_local_framework
26
+ @regex_local_framework ||= /^#{Dependencies.local_framework_path}\//
27
+ end
28
+
29
+ def self.regex_pakyow_lib
30
+ @regex_pakyow_lib ||= /^#{Pakyow.config.lib}\//
31
+ end
32
+
33
+ def self.regex_pakyow_root
34
+ @regex_pakyow_root ||= /^#{Pakyow.config.root}\//
35
+ end
36
+
37
+ def self.regex_ruby_gem
38
+ @regex_ruby_gem ||= /^#{Dependencies.ruby_gem_path}\//
39
+ end
40
+
41
+ def self.regex_ruby
42
+ @regex_ruby ||= /^#{RbConfig::CONFIG["libdir"]}\//
43
+ end
10
44
 
11
45
  def strip_path_prefix(line)
12
46
  if line.start_with?(Pakyow.config.root)
13
- line.gsub(/^#{Pakyow.config.root}\//, "")
47
+ line.gsub(Dependencies.regex_pakyow_root, "")
14
48
  elsif line.start_with?(Pakyow.config.lib)
15
- line.gsub(/^#{Pakyow.config.lib}\//, "")
16
- elsif line.start_with?(Gem.default_dir)
17
- line.gsub(/^#{Gem.default_dir}\/gems\//, "")
18
- elsif line.start_with?(Bundler.bundle_path.to_s)
19
- line.gsub(/^#{Bundler.bundle_path.to_s}\/gems\//, "")
49
+ line.gsub(Dependencies.regex_pakyow_lib, "")
50
+ elsif line.start_with?(Dependencies.ruby_gem_path)
51
+ line.gsub(Dependencies.regex_ruby_gem, "")
52
+ elsif line.start_with?(Dependencies.bundler_gem_path)
53
+ line.gsub(Dependencies.regex_bundler, "")
20
54
  elsif line.start_with?(RbConfig::CONFIG["libdir"])
21
- line.gsub(/^#{RbConfig::CONFIG["libdir"]}\//, "")
22
- elsif line.start_with?(LOCAL_FRAMEWORK_PATH)
23
- line.gsub(/^#{LOCAL_FRAMEWORK_PATH}\//, "")
55
+ line.gsub(Dependencies.regex_ruby, "")
56
+ elsif line.start_with?(Dependencies.local_framework_path)
57
+ line.gsub(Dependencies.regex_local_framework, "")
24
58
  else
25
59
  line
26
60
  end
@@ -28,8 +62,10 @@ module Pakyow
28
62
 
29
63
  def library_name(line)
30
64
  case library_type(line)
31
- when :gem, :bundler
65
+ when :gem
32
66
  strip_path_prefix(line).split("/")[0].split("-")[0..-2].join("-")
67
+ when :bundler
68
+ strip_path_prefix(line).split("/")[1]
33
69
  when :ruby
34
70
  "ruby"
35
71
  when :pakyow
@@ -42,13 +78,13 @@ module Pakyow
42
78
  end
43
79
 
44
80
  def library_type(line)
45
- if line.start_with?(Gem.default_dir)
81
+ if line.start_with?(Dependencies.ruby_gem_path)
46
82
  :gem
47
- elsif line.start_with?(Bundler.bundle_path.to_s)
83
+ elsif line.start_with?(Dependencies.bundler_gem_path)
48
84
  :bundler
49
85
  elsif line.start_with?(RbConfig::CONFIG["libdir"])
50
86
  :ruby
51
- elsif line.start_with?(LOCAL_FRAMEWORK_PATH)
87
+ elsif line.start_with?(Dependencies.local_framework_path)
52
88
  :pakyow
53
89
  elsif line.start_with?(Pakyow.config.lib)
54
90
  :lib
@@ -11,7 +11,7 @@ module Pakyow
11
11
  class MessageVerifier
12
12
  attr_reader :key
13
13
 
14
- JOIN_CHARACTER = "--"
14
+ JOIN_CHARACTER = "~"
15
15
 
16
16
  # TODO: support configuring the digest
17
17
  # TODO: support rotations by calling `rotate` with options
@@ -307,7 +307,7 @@ module Pakyow
307
307
  else
308
308
  @block
309
309
  end
310
- elsif @target.is_a?(Symbol) && context.respond_to?(@target, true)
310
+ elsif @target.is_a?(Symbol) && context.respond_to?(@target, true) && (options[0].nil? || !options[0].instance_methods(false).include?(:call))
311
311
  if context
312
312
  context.method(@target)
313
313
  else
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pakyow-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Powell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-16 00:00:00.000000000 Z
11
+ date: 2019-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -30,56 +30,56 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.1'
33
+ version: 0.2.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.1'
40
+ version: 0.2.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: pastel
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.7'
47
+ version: 0.7.3
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.7'
54
+ version: 0.7.3
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: tty-command
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.8'
61
+ version: 0.9.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.8'
68
+ version: 0.9.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: tty-spinner
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.9'
75
+ version: 0.9.1
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0.9'
82
+ version: 0.9.1
83
83
  description: Supporting code for Pakyow
84
84
  email: bryan@bryanp.org
85
85
  executables: []