texy 0.8.2 → 0.8.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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/texy/configuration.rb +3 -3
- data/lib/texy/configuration/client.rb +7 -7
- data/lib/texy/configuration/{nead_werx.rb → company.rb} +4 -4
- data/lib/texy/document.rb +14 -14
- data/lib/texy/documents/change_order.rb +2 -2
- data/lib/texy/documents/statement_of_work.rb +2 -2
- data/lib/texy/version.rb +1 -1
- data/texy.gemspec +13 -13
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbc336b802cc6399c4aacfb79cfc95f745f1f582f2763b3ff08709d2a28ae811
|
4
|
+
data.tar.gz: 58a2ee34ea84b662b3bfe433ebd6b0df9d87e2b084bc81fcd36f05590a3e9854
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e70e345718dfc974e82b8d5b16c7497e6e66c55ccc736b6d05316024800f072ea2c39cff0045679c7624e0779d9ba7ab27390237ee4715e327996122242802b
|
7
|
+
data.tar.gz: 2f56c11c16e76058c4f342292dbea416cbdc24c356cf14643f2f24c965ffe69f354790de9b61a011a310122fcfdd3768b36dccb89e3b39bf4d2255eb5ff054e7
|
data/Gemfile.lock
CHANGED
data/lib/texy/configuration.rb
CHANGED
@@ -6,7 +6,7 @@ module Texy
|
|
6
6
|
include Thor::Actions
|
7
7
|
|
8
8
|
attr_reader :configuration
|
9
|
-
attr_reader :
|
9
|
+
attr_reader :company
|
10
10
|
attr_reader :client
|
11
11
|
|
12
12
|
CONFIGURATION_FILE_NAME = "customers.yml"
|
@@ -21,8 +21,8 @@ module Texy
|
|
21
21
|
exit
|
22
22
|
end
|
23
23
|
|
24
|
-
@
|
25
|
-
@client
|
24
|
+
@company = Configuration::Company.new(configuration.dig(:company))
|
25
|
+
@client = Configuration::Client.new(configuration.dig(:client))
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -23,20 +23,20 @@ module Texy
|
|
23
23
|
|
24
24
|
def extract_people
|
25
25
|
@principal = Configuration::Person.new(**configuration.dig(:principal))
|
26
|
-
@signer
|
26
|
+
@signer = Configuration::Person.new(**configuration.dig(:signer))
|
27
27
|
end
|
28
28
|
|
29
29
|
def extract_rate
|
30
|
-
@rate
|
30
|
+
@rate = configuration.dig(:rate)
|
31
31
|
@rate_multiplier = configuration.dig(:rate_multiplier)
|
32
32
|
end
|
33
33
|
|
34
34
|
def extract_basic_info
|
35
|
-
@name
|
36
|
-
@short_name
|
37
|
-
@abbreviation
|
38
|
-
@number
|
39
|
-
@system_name
|
35
|
+
@name = configuration.dig(:name)
|
36
|
+
@short_name = configuration.dig(:short_name)
|
37
|
+
@abbreviation = configuration.dig(:abbreviation)
|
38
|
+
@number = configuration.dig(:number)
|
39
|
+
@system_name = configuration.dig(:system_name)
|
40
40
|
end
|
41
41
|
end
|
42
42
|
end
|
@@ -2,12 +2,12 @@
|
|
2
2
|
|
3
3
|
module Texy
|
4
4
|
class Configuration
|
5
|
-
class
|
5
|
+
class Company
|
6
6
|
attr_reader :configuration
|
7
7
|
attr_reader :principal, :signer
|
8
8
|
|
9
|
-
def initialize(
|
10
|
-
@configuration =
|
9
|
+
def initialize(company_configuration)
|
10
|
+
@configuration = company_configuration
|
11
11
|
|
12
12
|
extract_people
|
13
13
|
end
|
@@ -16,7 +16,7 @@ module Texy
|
|
16
16
|
|
17
17
|
def extract_people
|
18
18
|
@principal = Configuration::Person.new(**configuration.dig(:principal))
|
19
|
-
@signer
|
19
|
+
@signer = Configuration::Person.new(**configuration.dig(:signer))
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
data/lib/texy/document.rb
CHANGED
@@ -13,7 +13,7 @@ module Texy
|
|
13
13
|
def initialize
|
14
14
|
@client = ask("Which client folder will this #{type_humanized} be in?", :yellow)
|
15
15
|
@number = ask("Which #{type_humanized} number is this?", :yellow).rjust(3, "0")
|
16
|
-
@title
|
16
|
+
@title = ask("What is the title of this document?", :yellow)
|
17
17
|
end
|
18
18
|
|
19
19
|
def branch
|
@@ -37,31 +37,31 @@ module Texy
|
|
37
37
|
# Placeholders dependent on the client configuration
|
38
38
|
def config_placeholders
|
39
39
|
{
|
40
|
-
/TEMPLATE-PLACEHOLDER-CLIENT-NAME/
|
41
|
-
/TEMPLATE-PLACEHOLDER-CLIENT-NUMBER/
|
42
|
-
/TEMPLATE-PLACEHOLDER-CLIENT-SHORT-NAME/
|
43
|
-
/TEMPLATE-PLACEHOLDER-CLIENT-PRINCIPAL-NAME/
|
44
|
-
/TEMPLATE-PLACEHOLDER-CLIENT-SIGNER-NAME/
|
45
|
-
/TEMPLATE-PLACEHOLDER-CLIENT-SIGNER-ROLE/
|
46
|
-
/TEMPLATE-PLACEHOLDER-NEAD-WERX-PRINCIPAL-NAME/ => ->(config) { config.
|
47
|
-
/TEMPLATE-PLACEHOLDER-NEAD-WERX-SIGNER-NAME/
|
48
|
-
/TEMPLATE-PLACEHOLDER-NEAD-WERX-SIGNER-ROLE/
|
40
|
+
/TEMPLATE-PLACEHOLDER-CLIENT-NAME/ => ->(config) { config.client.name },
|
41
|
+
/TEMPLATE-PLACEHOLDER-CLIENT-NUMBER/ => ->(config) { config.client.number },
|
42
|
+
/TEMPLATE-PLACEHOLDER-CLIENT-SHORT-NAME/ => ->(config) { config.client.short_name },
|
43
|
+
/TEMPLATE-PLACEHOLDER-CLIENT-PRINCIPAL-NAME/ => ->(config) { config.client.principal.name },
|
44
|
+
/TEMPLATE-PLACEHOLDER-CLIENT-SIGNER-NAME/ => ->(config) { config.client.signer.name },
|
45
|
+
/TEMPLATE-PLACEHOLDER-CLIENT-SIGNER-ROLE/ => ->(config) { config.client.signer.role },
|
46
|
+
/TEMPLATE-PLACEHOLDER-NEAD-WERX-PRINCIPAL-NAME/ => ->(config) { config.company.principal.name },
|
47
|
+
/TEMPLATE-PLACEHOLDER-NEAD-WERX-SIGNER-NAME/ => ->(config) { config.company.signer.name },
|
48
|
+
/TEMPLATE-PLACEHOLDER-NEAD-WERX-SIGNER-ROLE/ => ->(config) { config.company.signer.role }
|
49
49
|
}
|
50
50
|
end
|
51
51
|
|
52
52
|
# Placeholders dependent on this specific document, not the client in general
|
53
53
|
def base_placeholders
|
54
54
|
{
|
55
|
-
/TEMPLATE-PLACEHOLDER-PROJECT-NUMBER/
|
56
|
-
/TEMPLATE-PLACEHOLDER-PROJECT-TITLE/
|
57
|
-
/TEMPLATE-PLACEHOLDER-DOCUMENT-VERSION/ => ->(_document) { "1.0" }
|
55
|
+
/TEMPLATE-PLACEHOLDER-PROJECT-NUMBER/ => ->(document) { document.number },
|
56
|
+
/TEMPLATE-PLACEHOLDER-PROJECT-TITLE/ => ->(document) { document.title },
|
57
|
+
/TEMPLATE-PLACEHOLDER-DOCUMENT-VERSION/ => ->(_document) { "1.0" }
|
58
58
|
}
|
59
59
|
end
|
60
60
|
|
61
61
|
# Placeholders located in the index file, not the LaTeX file
|
62
62
|
def index_file_placeholders
|
63
63
|
{
|
64
|
-
/TEMPLATE-PLACEHOLDER-INDEX-TITLE/ => ->(document) { document.title }
|
64
|
+
/TEMPLATE-PLACEHOLDER-INDEX-TITLE/ => ->(document) { document.title }
|
65
65
|
}
|
66
66
|
end
|
67
67
|
|
@@ -21,8 +21,8 @@ module Texy
|
|
21
21
|
|
22
22
|
def config_placeholders
|
23
23
|
super.merge(
|
24
|
-
/TEMPLATE-PLACEHOLDER-CLIENT-HOURLY-RATE/
|
25
|
-
/TEMPLATE-PLACEHOLDER-CLIENT-RATE-MULTIPLIER/ => ->(config) { config.client.rate_multiplier }
|
24
|
+
/TEMPLATE-PLACEHOLDER-CLIENT-HOURLY-RATE/ => ->(config) { config.client.rate },
|
25
|
+
/TEMPLATE-PLACEHOLDER-CLIENT-RATE-MULTIPLIER/ => ->(config) { config.client.rate_multiplier }
|
26
26
|
)
|
27
27
|
end
|
28
28
|
end
|
@@ -21,8 +21,8 @@ module Texy
|
|
21
21
|
|
22
22
|
def config_placeholders
|
23
23
|
super.merge(
|
24
|
-
/TEMPLATE-PLACEHOLDER-CLIENT-HOURLY-RATE/
|
25
|
-
/TEMPLATE-PLACEHOLDER-CLIENT-RATE-MULTIPLIER/ => ->(config) { config.client.rate_multiplier }
|
24
|
+
/TEMPLATE-PLACEHOLDER-CLIENT-HOURLY-RATE/ => ->(config) { config.client.rate },
|
25
|
+
/TEMPLATE-PLACEHOLDER-CLIENT-RATE-MULTIPLIER/ => ->(config) { config.client.rate_multiplier }
|
26
26
|
)
|
27
27
|
end
|
28
28
|
end
|
data/lib/texy/version.rb
CHANGED
data/texy.gemspec
CHANGED
@@ -5,14 +5,14 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
require "texy/version"
|
6
6
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
|
-
spec.name
|
9
|
-
spec.version
|
10
|
-
spec.authors
|
11
|
-
spec.email
|
8
|
+
spec.name = "texy"
|
9
|
+
spec.version = Texy::VERSION
|
10
|
+
spec.authors = ["Stephen Dolan"]
|
11
|
+
spec.email = ["stephen@neadwerx.com"]
|
12
12
|
|
13
|
-
spec.summary
|
14
|
-
spec.description
|
15
|
-
spec.homepage
|
13
|
+
spec.summary = "Command line tool for SoW writing"
|
14
|
+
spec.description = "Command line tool for SoW writing"
|
15
|
+
spec.homepage = "https://neadwerx.com"
|
16
16
|
|
17
17
|
raise "RubyGems 2.0 or newer is required to protect against public gem pushes." unless spec.respond_to?(:metadata)
|
18
18
|
|
@@ -26,17 +26,17 @@ Gem::Specification.new do |spec|
|
|
26
26
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
27
27
|
end
|
28
28
|
|
29
|
-
spec.bindir
|
30
|
-
spec.executables
|
29
|
+
spec.bindir = "exe"
|
30
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
31
|
spec.require_paths = ["lib"]
|
32
32
|
|
33
33
|
spec.add_dependency "activesupport", "~> 6.0"
|
34
34
|
spec.add_dependency "thor", "~> 0.20.3"
|
35
35
|
spec.add_dependency "zeitwerk", "~> 2.1"
|
36
36
|
|
37
|
-
spec.add_development_dependency "bundler",
|
38
|
-
spec.add_development_dependency "pry",
|
39
|
-
spec.add_development_dependency "rake",
|
40
|
-
spec.add_development_dependency "rspec",
|
37
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
38
|
+
spec.add_development_dependency "pry", "~> 0.12"
|
39
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
40
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
41
41
|
spec.add_development_dependency "standard", "~> 0.2.5"
|
42
42
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: texy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Dolan
|
@@ -144,7 +144,7 @@ files:
|
|
144
144
|
- lib/texy.rb
|
145
145
|
- lib/texy/configuration.rb
|
146
146
|
- lib/texy/configuration/client.rb
|
147
|
-
- lib/texy/configuration/
|
147
|
+
- lib/texy/configuration/company.rb
|
148
148
|
- lib/texy/configuration/person.rb
|
149
149
|
- lib/texy/document.rb
|
150
150
|
- lib/texy/documents/change_order.rb
|