spectacle 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,13 @@
1
+ require 'spec_helper'
2
+
3
+ describe Spectacle::DSL do
4
+
5
+ subject { described_class } #.new()
6
+
7
+ describe '#dsl methods' do
8
+ it 'generates documentation' do
9
+ expect(subject.generate).to be_truthy
10
+ end
11
+ end
12
+
13
+ end
@@ -0,0 +1,56 @@
1
+ require 'rails'
2
+ require 'spectacle'
3
+ require 'ostruct'
4
+ require 'json'
5
+ require 'pathname'
6
+
7
+ RSpec.configure do |config|
8
+ config.expect_with :rspec do |c|
9
+ c.syntax = :expect
10
+ end
11
+ config.color = true
12
+
13
+ config.before(:each) do
14
+ Spectacle::Config.spec_file = '/home/kam/tommy/tommy/vendor/gems/spectacle/spec/fixtures/spec/tommy.json'
15
+ end
16
+ end
17
+
18
+ # DEFAULT_VER = Spectacle::DEFAULT_VER
19
+
20
+ # def generate(config)
21
+ # Spectacle::Generator::write_docs(config)
22
+ # end
23
+ #
24
+ # def stub_string_verb_route(verb, action, controller, spec)
25
+ # double('route', :verb => verb,
26
+ # :defaults => {:action => action, :controller => controller},
27
+ # :path => spec
28
+ # )
29
+ # end
30
+ #
31
+ # def stub_route(verb, action, controller, spec)
32
+ # double('route', :verb => double('verb', :source => verb),
33
+ # :defaults => {:action => action, :controller => controller},
34
+ # :path => double('path', :spec => spec)
35
+ # )
36
+ # end
37
+ #
38
+ # def get_api_paths(apis, path)
39
+ # apis.select{|api| api['path'] == path}
40
+ # end
41
+ #
42
+ # def get_api_operations(apis, path)
43
+ # apis = get_api_paths(apis, path)
44
+ # apis.collect{|api| api['operations']}.flatten
45
+ # end
46
+ #
47
+ # def get_api_operation(apis, path, method)
48
+ # operations = get_api_operations(apis, path)
49
+ # operations.each{|operation| return operation if operation['method'] == method.to_s}
50
+ # nil
51
+ # end
52
+ #
53
+ # def get_api_parameter(api, name)
54
+ # api['parameters'].each{|param| return param if param['name'] == name}
55
+ # nil
56
+ # end
@@ -0,0 +1,30 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'spectacle/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "spectacle"
8
+ spec.version = Spectacle::VERSION
9
+ spec.authors = ["Kam Low"]
10
+ spec.email = ["auscaster@sourcey.com"]
11
+ spec.description = %q{Generates beautiful static documentation from a OpenAPI/Swagger 2.0 spec for you Rails API}
12
+ spec.summary = %q{Generates beautiful static documentation from a OpenAPI/Swagger 2.0 spec for you Rails API}
13
+ spec.homepage = "https://sourcey.com/spectacle"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ # spec.cert_chain = ['certs/gem-public_cert.pem']
22
+ # spec.signing_key = File.expand_path("~/.gemcert/gem-private_key.pem") if $0 =~ /gem\z/
23
+
24
+ spec.add_development_dependency "bundler", "~> 1.3"
25
+ spec.add_development_dependency "rake", "~> 10"
26
+ spec.add_development_dependency "rspec", "~> 3"
27
+
28
+ spec.add_runtime_dependency "rails", ">= 3"
29
+ spec.add_runtime_dependency "activesupport", ">= 3"
30
+ end
metadata ADDED
@@ -0,0 +1,137 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: spectacle
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.2
5
+ platform: ruby
6
+ authors:
7
+ - Kam Low
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-01-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rails
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '3'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '3'
69
+ - !ruby/object:Gem::Dependency
70
+ name: activesupport
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '3'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '3'
83
+ description: Generates beautiful static documentation from a OpenAPI/Swagger 2.0 spec
84
+ for you Rails API
85
+ email:
86
+ - auscaster@sourcey.com
87
+ executables: []
88
+ extensions: []
89
+ extra_rdoc_files: []
90
+ files:
91
+ - ".gitignore"
92
+ - Gemfile
93
+ - LICENSE.txt
94
+ - README.md
95
+ - Rakefile
96
+ - certs/gem-public_cert.pem
97
+ - config/routes.rb
98
+ - lib/spectacle.rb
99
+ - lib/spectacle/config.rb
100
+ - lib/spectacle/dsl.rb
101
+ - lib/spectacle/engine.rb
102
+ - lib/spectacle/task.rb
103
+ - lib/spectacle/version.rb
104
+ - lib/tasks/spectacle.rake
105
+ - spec/fixtures/tommy.json
106
+ - spec/lib/spectacle/dsl_spec.rb
107
+ - spec/spec_helper.rb
108
+ - spectacle.gemspec
109
+ homepage: https://sourcey.com/spectacle
110
+ licenses:
111
+ - MIT
112
+ metadata: {}
113
+ post_install_message:
114
+ rdoc_options: []
115
+ require_paths:
116
+ - lib
117
+ required_ruby_version: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ version: '0'
122
+ required_rubygems_version: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - ">="
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
127
+ requirements: []
128
+ rubyforge_project:
129
+ rubygems_version: 2.4.5
130
+ signing_key:
131
+ specification_version: 4
132
+ summary: Generates beautiful static documentation from a OpenAPI/Swagger 2.0 spec
133
+ for you Rails API
134
+ test_files:
135
+ - spec/fixtures/tommy.json
136
+ - spec/lib/spectacle/dsl_spec.rb
137
+ - spec/spec_helper.rb