appmap_swagger 0.1.0 → 0.1.1

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: fab77dbb3fd27bda9de4005dec030569a6c6c2e357e3aa395d0db0b756e2a17a
4
- data.tar.gz: b21378cc57387b4a692eef8d6559656a94328d34c4b7e4f81faf2f1de7671e31
3
+ metadata.gz: 11ade79b5b7c09c1599563595f3899a39ea69c946fa50e04ac6c1eb5ad22a609
4
+ data.tar.gz: ff59a7ff4bda8db6a7af42be1cd01f35d92da1d0cbe76d20a7a86483741aa66e
5
5
  SHA512:
6
- metadata.gz: ccea92116d5bcceecdad969785e62b2e229abf288a810a52e144382a156a68a8357be1099fcf58c9f399d2fac557cf19731da716db4734b512e78f5e159e5671
7
- data.tar.gz: bfaf3e21575f94349442bfad0c9906941328303e9749df18ba35fed2a82babd4959118f0dea9259ceb8d75944271f0c8694364201d8e0a72b69b8e0ad455694f
6
+ metadata.gz: abd715f95f37a2f39bfc4f4c1bda90cc99693ffc69cc86d2470767096cbb0f1a7239bf5461d4b3ab5ccc68211aebc56f919cd5ff622b73a77d0e103ae79ef457
7
+ data.tar.gz: 363620830c77e63dced22ad2cbbf9822861ca6e108f21e5e159a6d9a08d873b190bd863c0b79107c08b4989f88537c1496433f6249d7aeb65a5bdd7cb08f14d8
data/CHANGELOG.md ADDED
@@ -0,0 +1,4 @@
1
+ # v0.1.1
2
+
3
+ * Be sure and reference global `::Rails`.
4
+
data/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # `appmap_swagger`
2
2
 
3
- This gem provides a Rake task called `appmap:swagger` that generates [Swagger 3](https://swagger.io/specification/) (aka OpenAPI) YAML from [AppMap](https://github.com/applandinc/appmap-ruby) data.
3
+ This gem provides a Rake task called `swagger` that generates [Swagger 3](https://swagger.io/specification/) (aka OpenAPI) YAML from [AppMap](https://github.com/applandinc/appmap-ruby) data.
4
4
 
5
5
  It depends on an NPM package called [@appland/appmap-swagger](https://www.npmjs.com/package/@appland/appmap-swagger), which does most of the heavy lifting of converting AppMaps to Swagger. This gem adds the Rake task and some niceties such as Rails integration.
6
6
 
7
7
  # How it works
8
8
 
9
- The Rake task `appmap:swagger`:
9
+ The Rake task `swagger`:
10
10
 
11
11
  1. Requires Node.js, and it requires the `@appland/appmap-swagger` package to be installed from NPM.
12
12
  2. Runs the Node.js program `appmap-swagger` to generate Swagger YAML.
@@ -42,6 +42,7 @@ In the file, check if `AppMap` is loaded, and then configure the Rake task. You'
42
42
  a project name and version. (The default project name is determined from your Rails Application class name and might be fine, actually).
43
43
 
44
44
  ```ruby
45
+ namespace :appmap do
45
46
  if defined?(AppMap::Swagger)
46
47
  AppMap::Swagger::RakeTask.new.tap do |task|
47
48
  task.project_name = 'My Server API'
@@ -49,6 +50,7 @@ a project name and version. (The default project name is determined from your Ra
49
50
  task.project_version = "v#{File.read(File.join(Rails.root, 'VERSION')).strip}"
50
51
  end
51
52
  end
53
+ end
52
54
  ```
53
55
 
54
56
  ## Incorporating the Swagger API and UI
@@ -25,8 +25,8 @@ module AppMap
25
25
  module_parent_name = ->(cls) { cls.name =~ /::[^:]+\Z/ ? $`.freeze : nil }
26
26
 
27
27
  @project_name = \
28
- if defined?(Rails)
29
- [ module_parent_name.(Rails.application.class).humanize.titleize, 'API' ].join(' ')
28
+ if defined?(::Rails)
29
+ [ module_parent_name.(::Rails.application.class).humanize.titleize, 'API' ].join(' ')
30
30
  else
31
31
  'MyProject API'
32
32
  end
@@ -1,5 +1,5 @@
1
1
  module AppMap
2
2
  module Swagger
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appmap_swagger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Gilpin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-04-01 00:00:00.000000000 Z
11
+ date: 2021-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -89,8 +89,8 @@ extra_rdoc_files: []
89
89
  files:
90
90
  - ".gitignore"
91
91
  - ".travis.yml"
92
+ - CHANGELOG.md
92
93
  - Gemfile
93
- - Gemfile.lock
94
94
  - LICENSE.txt
95
95
  - README.md
96
96
  - Rakefile
data/Gemfile.lock DELETED
@@ -1,45 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- appmap_swagger (0.1.0)
5
- activesupport
6
- rake
7
- rdoc
8
- reverse_markdown
9
-
10
- GEM
11
- remote: https://rubygems.org/
12
- specs:
13
- activesupport (6.1.3.1)
14
- concurrent-ruby (~> 1.0, >= 1.0.2)
15
- i18n (>= 1.6, < 2)
16
- minitest (>= 5.1)
17
- tzinfo (~> 2.0)
18
- zeitwerk (~> 2.3)
19
- concurrent-ruby (1.1.8)
20
- i18n (1.8.10)
21
- concurrent-ruby (~> 1.0)
22
- mini_portile2 (2.5.0)
23
- minitest (5.14.4)
24
- nokogiri (1.11.2)
25
- mini_portile2 (~> 2.5.0)
26
- racc (~> 1.4)
27
- racc (1.5.2)
28
- rake (12.3.3)
29
- rdoc (6.3.0)
30
- reverse_markdown (2.0.0)
31
- nokogiri
32
- tzinfo (2.0.4)
33
- concurrent-ruby (~> 1.0)
34
- zeitwerk (2.4.2)
35
-
36
- PLATFORMS
37
- ruby
38
-
39
- DEPENDENCIES
40
- appmap_swagger!
41
- minitest (~> 5.0)
42
- rake (~> 12.0)
43
-
44
- BUNDLED WITH
45
- 2.1.4