mn-requirements 0.2.0 → 0.2.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: 1cc32c6334d63f4745d279e84ea08305400eccc4f020ac410b85488e47e3c6ce
4
- data.tar.gz: 57e1f8b559a619d6d01a18520d15f3de7787d0eb7fed17add4c120bc58b0d862
3
+ metadata.gz: ed29bf407c16d8890bb04abf9028498f568a8d42cb2d232aab1f2312ccd045c3
4
+ data.tar.gz: 7cb6924aa3b79542533047703be36e769b4e69b299c052868232ed81764b45c0
5
5
  SHA512:
6
- metadata.gz: 817a441beba95552171c674b07c7d447808496a642c90181baf039723b7fcdef1dbb5ee23ecac9e167ffea9d09871af3bfa48dec7c40c7cc46b4fe48559e1286
7
- data.tar.gz: '09ee6db13e6fc2eb7e99ec2fbeb281a6ce3a9aed08e8d41b865a1acd458c2ec9fa642325bfff50de1ec8689ba9f8e8a74f914e0c5e3759670ee85c183f787ec1'
6
+ metadata.gz: bb1c844f85032d0fac0c678259ca2983debbbe55f7cbf308d155aac2f7f8169142ec2f838a57c0329dd6f9aa1d007e4040c7e3cf0bdf33205b41b6cdc737e40b
7
+ data.tar.gz: 49b72dcb20a45e87f82fa0b64bdc7db99374f2cf2c1c0bb031543cef803306e17e240b015c9a6a120a9714d5f8064dc4d18d72adad71d27e4864f91d24f88778
@@ -21,7 +21,7 @@ module Metanorma
21
21
 
22
22
  def requirement_metadata_component_tags
23
23
  %w(test-purpose test-method test-method-type conditions part description
24
- reference step guidance) +
24
+ statement reference step guidance) +
25
25
  requirement_metadata_requirement_tags
26
26
  end
27
27
 
@@ -35,6 +35,7 @@ module Metanorma
35
35
  ins1 = super
36
36
  dlist.xpath("./dt").each do |e|
37
37
  tag = e.text&.gsub(/ /, "-")&.downcase
38
+ tag = "description" if tag == "statement"
38
39
  next unless requirement_metadata_component_tags.include?(tag)
39
40
 
40
41
  ins1.next = requirement_metadata1_component(e, tag)
@@ -75,7 +76,7 @@ module Metanorma
75
76
 
76
77
  def requirement_target_identifiers(reqt)
77
78
  reqt.xpath("./classification[tag][value/link]").each do |c|
78
- %w(target indirect-dependency implements)
79
+ %w(target indirect-dependency implements identifier-base)
79
80
  .include?(c.at("./tag").text.downcase) or next
80
81
  v = c.at("./value[link]")
81
82
  v.children = v.at("./link/@target").text
@@ -83,7 +84,7 @@ module Metanorma
83
84
  end
84
85
 
85
86
  def requirement_metadata_to_component(reqt)
86
- xpath = requirement_metadata_component_tags - %w(description) -
87
+ xpath = requirement_metadata_component_tags - %w(statement description) -
87
88
  requirement_metadata_requirement_tags
88
89
  reqt.xpath(xpath.map { |x| ".//#{x}" }.join(" | ")).each do |c|
89
90
  c["class"] = c.name
@@ -119,6 +120,40 @@ module Metanorma
119
120
  c.children = "<p>#{c.children.to_xml}</p>"
120
121
  end
121
122
  end
123
+
124
+ def add_misc_container(xmldoc)
125
+ unless ins = xmldoc.at("//misc-container")
126
+ a = xmldoc.at("//termdocsource") || xmldoc.at("//bibdata")
127
+ a.next = "<misc-container/>"
128
+ ins = xmldoc.at("//misc-container")
129
+ end
130
+ ins
131
+ end
132
+
133
+ def add_misccontainer_anchor_aliases(xmldoc)
134
+ m = add_misc_container(xmldoc)
135
+ x = ".//table[@id = '_misccontainer_anchor_aliases']/tbody"
136
+ unless ins = m.at(x)
137
+ m << "<table id = '_misccontainer_anchor_aliases'><tbody/></table>"
138
+ ins = m.at(x)
139
+ end
140
+ ins
141
+ end
142
+
143
+ def requirement_anchor_aliases(reqt)
144
+ x = reqt.xpath("./identifier")
145
+ x.empty? and return
146
+ table = add_misccontainer_anchor_aliases(reqt.document)
147
+ ids = x.each_with_object([]) do |i, m|
148
+ m << "<td>#{i.text}</td>"
149
+ end
150
+ table << "<tr><th>#{reqt['id']}</th>#{ids.join}</tr>"
151
+ end
152
+
153
+ def requirement_identifier_cleanup(reqt)
154
+ super
155
+ requirement_anchor_aliases(reqt)
156
+ end
122
157
  end
123
158
  end
124
159
  end
@@ -69,8 +69,11 @@ module Metanorma
69
69
 
70
70
  def recommend_title(node, out)
71
71
  label = node.at(ns("./identifier")) or return
72
- out.add_child("<tr><th>#{@labels['modspec']['identifier']}</th>" \
73
- "<td><tt>#{label.children.to_xml}</tt></td>")
72
+ ret = <<~OUTPUT
73
+ <tr><th>#{@labels['modspec']['identifier']}</th>
74
+ <td><tt><modspec-ident>#{label.children.to_xml}</modspec-ident></tt></td>
75
+ OUTPUT
76
+ out.add_child(ret)
74
77
  end
75
78
 
76
79
  def recommendation_attributes1(node)
@@ -162,7 +165,7 @@ module Metanorma
162
165
  def recommendation_attr_keyvalue(node, key, value)
163
166
  tag = node.at(ns("./#{key}")) or return nil
164
167
  value = node.at(ns("./#{value}")) or return nil
165
- !%w(target indirect-dependency
168
+ !%w(target indirect-dependency identifier-base
166
169
  implements).include?(tag.text.downcase) or
167
170
  return nil
168
171
  [Metanorma::Utils.strict_capitalize_first(tag.text), value.children]
@@ -194,9 +197,9 @@ module Metanorma
194
197
  end
195
198
 
196
199
  def requirement_description_parse(node, out)
197
- lbl = "statement"
198
- recommend_class(node.parent) == "recommendclass" and
199
- lbl = "description"
200
+ lbl = "description"
201
+ recommend_class(node.parent) == "recommend" and
202
+ lbl = "statement"
200
203
  out << "<tr><th>#{@labels['modspec'][lbl]}</th>" \
201
204
  "<td>#{node.children.to_xml}</td></tr>"
202
205
  out
@@ -5,6 +5,10 @@ require_relative "isodoc"
5
5
  module Metanorma
6
6
  class Requirements
7
7
  class Modspec < Default
8
+ def initialize(options)
9
+ super
10
+ @modspecidentifierbase = @parent.modspecidentifierbase
11
+ end
8
12
  end
9
13
  end
10
14
  end
@@ -1,3 +1,10 @@
1
+ class Nokogiri::XML::Document
2
+ def reqt_iter(&block)
3
+ xpath("//xmlns:requirement | //xmlns:recommendation | //xmlns:permission")
4
+ .each_with_object({}, &block)
5
+ end
6
+ end
7
+
1
8
  module Metanorma
2
9
  class Requirements
3
10
  class Modspec < Default
@@ -31,13 +38,14 @@ module Metanorma
31
38
  @reqt_ids = reqt_ids(doc)
32
39
  @reqt_links_class = reqt_links_class(doc)
33
40
  @reqt_links_test = reqt_links_test(doc)
41
+ @reqt_id_base = reqt_id_base(doc)
42
+ truncate_id_base_outside_reqts(doc)
34
43
  end
35
44
 
36
45
  def reqtlabels(doc)
37
- doc.xpath(ns("//requirement | //recommendation | //permission"))
38
- .each_with_object({}) do |r, m|
39
- l = r.at(ns("./identifier"))&.text and m[l] = r["id"]
40
- end
46
+ doc.reqt_iter do |r, m|
47
+ l = r.at(ns("./identifier"))&.text and m[l] = r["id"]
48
+ end
41
49
  end
42
50
 
43
51
  # embedded reqts xref to reqts via label lookup
@@ -62,30 +70,23 @@ module Metanorma
62
70
  end
63
71
 
64
72
  def reqt_ids(docxml)
65
- docxml.xpath(ns("//requirement | //recommendation | //permission"))
66
- .each_with_object({}) do |r, m|
67
- id = r.at(ns("./identifier")) or next
68
- m[id.text] =
69
- { id: r["id"], lbl: @xrefs.anchor(r["id"], :xref, false) }
70
- end
73
+ docxml.reqt_iter do |r, m|
74
+ id = r.at(ns("./identifier")) or next
75
+ m[id.text] =
76
+ { id: r["id"], lbl: @xrefs.anchor(r["id"], :xref, false) }
77
+ end
71
78
  end
72
79
 
73
80
  def reqt_links_test(docxml)
74
- docxml.xpath(ns("//requirement | //recommendation | //permission"))
75
- .each_with_object({}) do |r, m|
76
- reqt_links_test1(r, m)
77
- end
81
+ docxml.reqt_iter { |r, m| reqt_links_test1(r, m) }
78
82
  end
79
83
 
80
84
  def reqt_links_test1(reqt, acc)
81
- return unless %w(conformanceclass
82
- verification).include?(reqt["type"])
83
-
85
+ %w(conformanceclass verification).include?(reqt["type"]) or return
84
86
  subj = reqt_extract_target(reqt)
85
87
  id = reqt.at(ns("./identifier")) or return
86
88
  lbl = @xrefs.anchor(@reqt_ids[id.text.strip][:id], :xref, false)
87
- return unless subj && lbl
88
-
89
+ (subj && lbl) or return
89
90
  acc[subj.text] = { lbl: lbl, id: reqt["id"] }
90
91
  end
91
92
 
@@ -95,26 +96,62 @@ module Metanorma
95
96
  end&.at(ns("./value"))
96
97
  end
97
98
 
99
+ def reqt_extract_id_base(reqt)
100
+ reqt.xpath(ns("./classification[tag][value]")).detect do |x|
101
+ x.at(ns("./tag")).text.casecmp("identifier-base").zero?
102
+ end&.at(ns("./value"))
103
+ end
104
+
98
105
  def recommendation_link_test(ident)
99
106
  test = @reqt_links_test[ident&.strip] or return nil
100
107
  "<xref target='#{test[:id]}'>#{test[:lbl]}</xref>"
101
108
  end
102
109
 
110
+ # we have not implemented multiple levels of nesting of classes
103
111
  def reqt_links_class(docxml)
104
- docxml.xpath(ns("//requirement | //recommendation | //permission"))
105
- .each_with_object({}) do |r, m|
106
- next unless %w(class conformanceclass).include?(r["type"])
107
-
108
- id = r.at(ns("./identifier")) or next
109
- r.xpath(ns("./requirement | ./recommendation | ./permission"))
110
- .each do |r1|
111
- id1 = r1.at(ns("./identifier")) or next
112
- lbl = @xrefs.anchor(@reqt_ids[id.text.strip][:id], :xref, false)
113
- next unless lbl
114
-
115
- m[id1.text] = { lbl: lbl, id: r["id"] }
116
- end
112
+ docxml.reqt_iter do |r, m|
113
+ %w(class conformanceclass).include?(r["type"]) or next
114
+ id = r.at(ns("./identifier")) or next
115
+ r.xpath(ns("./requirement | ./recommendation | ./permission"))
116
+ .each do |r1|
117
+ m = reqt_links_class1(id, r, r1, m)
117
118
  end
119
+ end
120
+ end
121
+
122
+ def reqt_links_class1(id, parent_reqt, reqt, acc)
123
+ id1 = reqt.at(ns("./identifier")) or return acc
124
+ lbl = @xrefs.anchor(@reqt_ids[id.text.strip][:id], :xref, false)
125
+ lbl or return acc
126
+ acc[id1.text] = { lbl: lbl, id: parent_reqt["id"] }
127
+ acc
128
+ end
129
+
130
+ def reqt_hierarchy_extract
131
+ @reqt_links_class.each_with_object({}) do |(k, v), m|
132
+ m[v[:id]] ||= []
133
+ m[v[:id]] << @reqt_ids[k][:id]
134
+ end
135
+ end
136
+
137
+ def reqt_id_base_init(docxml)
138
+ docxml.reqt_iter { |r, m| m[r["id"]] = reqt_extract_id_base(r)&.text }
139
+ end
140
+
141
+ def reqt_id_base_inherit(ret, class2reqt)
142
+ ret.each_key do |k|
143
+ class2reqt[k]&.each do |k1|
144
+ ret[k1] ||= ret[k]
145
+ end
146
+ end
147
+ ret
148
+ end
149
+
150
+ def reqt_id_base(docxml)
151
+ ret = reqt_id_base_init(docxml)
152
+ ret = reqt_id_base_inherit(ret, reqt_hierarchy_extract)
153
+ @modspecidentifierbase or return ret
154
+ ret.each_key { |k| ret[k] ||= @modspecidentifierbase }
118
155
  end
119
156
 
120
157
  def recommendation_link_class(ident)
@@ -143,6 +180,17 @@ module Metanorma
143
180
  ret
144
181
  end
145
182
 
183
+ def truncate_id_base_outside_reqts(docxml)
184
+ @modspecidentifierbase or return
185
+
186
+ (docxml.xpath(ns("//xref[@style = 'id']")) - docxml
187
+ .xpath(ns("//requirement//xref | //permission//xref | " \
188
+ "//recommendation//xref"))).each do |x|
189
+ @reqt_id_base[x["target"]] or next # is a modspec requirement
190
+ x.children = x.children.to_xml.delete_prefix(@modspecidentifierbase)
191
+ end
192
+ end
193
+
146
194
  def rec_subj(node)
147
195
  case node["type"]
148
196
  when "class" then @labels["modspec"]["targettype"]
@@ -4,6 +4,8 @@ module Metanorma
4
4
  def requirement_table_cleanup(node, table)
5
5
  table = requirement_table_nested_cleanup(node, table)
6
6
  requirement_table_consec_rows_cleanup(node, table)
7
+ node.ancestors("requirement, recommendation, permission").empty? and
8
+ truncate_id_base_in_reqt(table)
7
9
  table
8
10
  end
9
11
 
@@ -57,6 +59,37 @@ module Metanorma
57
59
  node["type"] == "conformanceclass" and label = "conformancetest"
58
60
  @i18n.get["requirements"]["modspec"][label]
59
61
  end
62
+
63
+ def strip_id_base(elem, base)
64
+ return elem.children if base.nil?
65
+
66
+ elem.children.to_xml.delete_prefix(base)
67
+ end
68
+
69
+ def truncate_id_base_in_reqt1(table, base)
70
+ table.xpath(ns(".//xref[@style = 'id']")).each do |x|
71
+ @reqt_id_base[x["target"]] or next # is a modspec requirement
72
+ x.children = strip_id_base(x, base)
73
+ end
74
+ table.xpath(ns(".//modspec-ident")).each do |x|
75
+ x.replace(strip_id_base(x, base))
76
+ end
77
+ end
78
+
79
+ # any xrefs not yet expanded out to rendering need to be expanded out,
80
+ # so that the identifier instances they contain can be truncated
81
+ def expand_xrefs_in_reqt(table)
82
+ table.xpath(ns(".//xref[not(@style)][normalize-space(text()) = '']"))
83
+ .each do |x|
84
+ x << @xrefs.anchor(x["target"], :xref, false)
85
+ end
86
+ end
87
+
88
+ def truncate_id_base_in_reqt(table)
89
+ base = @reqt_id_base[table["id"]]
90
+ expand_xrefs_in_reqt(table)
91
+ truncate_id_base_in_reqt1(table, base)
92
+ end
60
93
  end
61
94
  end
62
95
  end
@@ -1,9 +1,12 @@
1
+ require "tsort"
2
+
1
3
  module Metanorma
2
4
  class Requirements
3
5
  class Modspec < Default
4
6
  def validate(reqt, log)
5
7
  @log ||= log
6
8
  @ids ||= reqt_links(reqt.document)
9
+ reqt_cycles_validate
7
10
  reqt_link_validate(reqt)
8
11
  end
9
12
 
@@ -140,6 +143,54 @@ module Metanorma
140
143
  indirect_dependency: classif_tag(reqt, "indirect-dependency"),
141
144
  implements: classif_tag(reqt, "implements") }
142
145
  end
146
+
147
+ def reqt_cycles_validate
148
+ @cycles_validated and return
149
+ @cycles_validated = true
150
+ %i(child dependency indirect_dependency implements).each do |x|
151
+ reqt_cycles_validate1(x)
152
+ end
153
+ end
154
+
155
+ def reqt_cycles_validate1(link)
156
+ arr = TSHash.new(@ids[:id].values)
157
+ arr.link = link
158
+ TSort.each_strongly_connected_component(
159
+ lambda { |&b| arr.tsort_each_node(&b) },
160
+ lambda { |n, &b| arr.tsort_each_child(n, &b) },
161
+ ) do |c|
162
+ c.size == 1 and next
163
+ log_cycle(link, c)
164
+ end
165
+ end
166
+
167
+ def log_cycle(link, path)
168
+ @log.add("Requirements", nil, <<~MSG
169
+ Cycle in Modspec linkages through #{link}: #{(path << path.first).join(' => ')}
170
+ MSG
171
+ )
172
+ end
173
+
174
+ class TSHash
175
+ include TSort
176
+ attr_accessor :link
177
+
178
+ def initialize(arr)
179
+ @hash = arr.each_with_object({}) do |v, m|
180
+ m[v[:label]] = v
181
+ end
182
+ end
183
+
184
+ def tsort_each_node(&block)
185
+ @hash.keys.each(&block)
186
+ end
187
+
188
+ def tsort_each_child(node, &block)
189
+ (@hash[node] || {})[@link]&.each(&block)
190
+ end
191
+ end
192
+
193
+ def reqt_cycles_validate_dependency; end
143
194
  end
144
195
  end
145
196
  end
@@ -73,7 +73,8 @@ module Metanorma
73
73
  super
74
74
  anchor[:xref_bare] = anchor[:xref]
75
75
  if l = block.at(ns("./identifier"))&.text
76
- anchor[:xref] += l10n(": ") + "<tt>#{l}</tt>"
76
+ anchor[:xref] += l10n(": ") +
77
+ "<tt><xref style='id' target='#{block['id']}'>#{l}</xref></tt>"
77
78
  end
78
79
  anchor
79
80
  end
@@ -5,7 +5,7 @@ require "metanorma-utils"
5
5
 
6
6
  module Metanorma
7
7
  class Requirements
8
- attr_accessor :i18n, :labels
8
+ attr_accessor :i18n, :labels, :modspecidentifierbase
9
9
 
10
10
  Hash.include Metanorma::Utils::Hash
11
11
 
@@ -17,6 +17,7 @@ module Metanorma
17
17
  options[:labels])
18
18
  # @labels = @i18n.get.deep_merge(options[:labels] || {})["requirements"]
19
19
  @labels = @i18n.get["requirements"]
20
+ @modspecidentifierbase = options[:modspecidentifierbase]
20
21
  @models =
21
22
  model_names.each_with_object({}) { |k, m| m[k] = create(k) }
22
23
  end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  class Requirements
3
- VERSION = "0.2.0".freeze
3
+ VERSION = "0.2.3".freeze
4
4
  end
5
5
  end
@@ -17,12 +17,13 @@ Gem::Specification.new do |spec|
17
17
  spec.license = "BSD-2-Clause"
18
18
 
19
19
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
20
- f.match(%r{^(test|spec|features)/})
20
+ f.match(%r{^(test|spec|features|bin|.github)/}) \
21
+ || f.match(%r{Rakefile|bin/rspec})
21
22
  end
22
23
  spec.bindir = "exe"
23
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
25
  spec.require_paths = ["lib"]
25
- spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
26
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
26
27
 
27
28
  spec.add_dependency "isodoc-i18n", "~> 1.1.2"
28
29
  spec.add_dependency "metanorma-utils", "~> 1.4.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mn-requirements
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-21 00:00:00.000000000 Z
11
+ date: 2022-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: isodoc-i18n
@@ -201,18 +201,12 @@ executables: []
201
201
  extensions: []
202
202
  extra_rdoc_files: []
203
203
  files:
204
- - ".github/workflows/rake.yml"
205
- - ".github/workflows/release.yml"
206
204
  - ".hound.yml"
207
205
  - ".rubocop.yml"
208
206
  - CODE_OF_CONDUCT.md
209
207
  - Gemfile
210
208
  - LICENSE
211
209
  - README.adoc
212
- - Rakefile
213
- - bin/console
214
- - bin/rspec
215
- - bin/setup
216
210
  - lib/isodoc-yaml/i18n-ar.yaml
217
211
  - lib/isodoc-yaml/i18n-de.yaml
218
212
  - lib/isodoc-yaml/i18n-en.yaml
@@ -249,14 +243,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
249
243
  requirements:
250
244
  - - ">="
251
245
  - !ruby/object:Gem::Version
252
- version: 2.5.0
246
+ version: 2.7.0
253
247
  required_rubygems_version: !ruby/object:Gem::Requirement
254
248
  requirements:
255
249
  - - ">="
256
250
  - !ruby/object:Gem::Version
257
251
  version: '0'
258
252
  requirements: []
259
- rubygems_version: 3.1.6
253
+ rubygems_version: 3.3.7
260
254
  signing_key:
261
255
  specification_version: 4
262
256
  summary: Requirements processing and rendering according to different models
@@ -1,15 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: rake
4
-
5
- on:
6
- push:
7
- branches: [ master, main ]
8
- tags: [ v* ]
9
- pull_request:
10
-
11
- jobs:
12
- rake:
13
- uses: metanorma/ci/.github/workflows/generic-rake.yml@main
14
- secrets:
15
- pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
@@ -1,27 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: release
4
-
5
- on:
6
- workflow_dispatch:
7
- inputs:
8
- next_version:
9
- description: |
10
- Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
11
- required: true
12
- default: 'skip'
13
- push:
14
- tags: [ v* ]
15
-
16
- jobs:
17
- release:
18
- uses: metanorma/ci/.github/workflows/rubygems-release.yml@main
19
- with:
20
- next_version: ${{ github.event.inputs.next_version }}
21
- release_command: rake release
22
- bundler_cache: false
23
- post_install: gem install bundler rake rspec
24
- secrets:
25
- rubygems-api-key: ${{ secrets.METANORMA_CI_RUBYGEMS_API_KEY }}
26
- pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
27
-
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task default: :spec
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "metanorma/ogc"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
data/bin/rspec DELETED
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'rspec' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path(
11
- "../../Gemfile", Pathname.new(__FILE__).realpath
12
- )
13
-
14
- require "rubygems"
15
- require "bundler/setup"
16
-
17
- load Gem.bin_path("rspec-core", "rspec")
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here