retrospec-plugingen 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3639afab2202a3e92b0e28e1c18441a5981a6a0f
4
+ data.tar.gz: 33a2a797c72907da27150f65f55818e718d2d810
5
+ SHA512:
6
+ metadata.gz: bf036166da33a0b89345329cfd41a2ec54cd81ec6b65e0a66080fc3913a8d3d36d09aec60ae1e4daf5458d2edc2d73a518c389b4c1b5b55971eac7cdb9c95a33
7
+ data.tar.gz: 443359d19ae6dc2d141d23b8fca572d8b4e0db8cc4463a3cb35489c9393c0fc5a0a719fa6c4c46f49271ffca73cf31cc8020b5763bf7aa886c53e5edc17e74d5
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/Gemfile ADDED
@@ -0,0 +1,18 @@
1
+ source "http://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ # gem "activesupport", ">= 2.3.5"
5
+
6
+ # Add dependencies to develop your gem here.
7
+ # Include everything needed to run rake, tests, features, etc.
8
+ group :development do
9
+ gem "rspec", "~> 3.2"
10
+ gem "rdoc", "~> 3.12"
11
+ gem "bundler", "~> 1.0"
12
+ gem "jeweler", "~> 2.0.1"
13
+ gem "simplecov", ">= 0"
14
+ gem "pry"
15
+ end
16
+ #gem 'retrospec', :git => 'https://github.com/nwops/retrospec.git'
17
+ gem 'retrospec', :path => '/Users/cosman/github/retrospec'
18
+ gem 'facets'
data/Gemfile.lock ADDED
@@ -0,0 +1,96 @@
1
+ PATH
2
+ remote: /Users/cosman/github/retrospec
3
+ specs:
4
+ retrospec (0.1.0)
5
+ trollop
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ addressable (2.3.8)
11
+ builder (3.2.2)
12
+ coderay (1.1.0)
13
+ descendants_tracker (0.0.4)
14
+ thread_safe (~> 0.3, >= 0.3.1)
15
+ diff-lcs (1.2.5)
16
+ docile (1.1.5)
17
+ facets (3.0.0)
18
+ faraday (0.9.1)
19
+ multipart-post (>= 1.2, < 3)
20
+ git (1.2.9.1)
21
+ github_api (0.12.4)
22
+ addressable (~> 2.3)
23
+ descendants_tracker (~> 0.0.4)
24
+ faraday (~> 0.8, < 0.10)
25
+ hashie (>= 3.4)
26
+ multi_json (>= 1.7.5, < 2.0)
27
+ nokogiri (~> 1.6.6)
28
+ oauth2
29
+ hashie (3.4.2)
30
+ highline (1.7.7)
31
+ jeweler (2.0.1)
32
+ builder
33
+ bundler (>= 1.0)
34
+ git (>= 1.2.5)
35
+ github_api
36
+ highline (>= 1.6.15)
37
+ nokogiri (>= 1.5.10)
38
+ rake
39
+ rdoc
40
+ json (1.8.3)
41
+ jwt (1.5.1)
42
+ method_source (0.8.2)
43
+ mini_portile (0.6.2)
44
+ multi_json (1.11.2)
45
+ multi_xml (0.5.5)
46
+ multipart-post (2.0.0)
47
+ nokogiri (1.6.6.2)
48
+ mini_portile (~> 0.6.0)
49
+ oauth2 (1.0.0)
50
+ faraday (>= 0.8, < 0.10)
51
+ jwt (~> 1.0)
52
+ multi_json (~> 1.3)
53
+ multi_xml (~> 0.5)
54
+ rack (~> 1.2)
55
+ pry (0.10.2)
56
+ coderay (~> 1.1.0)
57
+ method_source (~> 0.8.1)
58
+ slop (~> 3.4)
59
+ rack (1.6.4)
60
+ rake (10.4.2)
61
+ rdoc (3.12.2)
62
+ json (~> 1.4)
63
+ rspec (3.3.0)
64
+ rspec-core (~> 3.3.0)
65
+ rspec-expectations (~> 3.3.0)
66
+ rspec-mocks (~> 3.3.0)
67
+ rspec-core (3.3.2)
68
+ rspec-support (~> 3.3.0)
69
+ rspec-expectations (3.3.1)
70
+ diff-lcs (>= 1.2.0, < 2.0)
71
+ rspec-support (~> 3.3.0)
72
+ rspec-mocks (3.3.2)
73
+ diff-lcs (>= 1.2.0, < 2.0)
74
+ rspec-support (~> 3.3.0)
75
+ rspec-support (3.3.0)
76
+ simplecov (0.10.0)
77
+ docile (~> 1.1.0)
78
+ json (~> 1.8)
79
+ simplecov-html (~> 0.10.0)
80
+ simplecov-html (0.10.0)
81
+ slop (3.6.0)
82
+ thread_safe (0.3.5)
83
+ trollop (2.1.2)
84
+
85
+ PLATFORMS
86
+ ruby
87
+
88
+ DEPENDENCIES
89
+ bundler (~> 1.0)
90
+ facets
91
+ jeweler (~> 2.0.1)
92
+ pry
93
+ rdoc (~> 3.12)
94
+ retrospec!
95
+ rspec (~> 3.2)
96
+ simplecov
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2015 Corey Osman
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # retrospec-plugin_gen
2
+
3
+ ## Summary
4
+ This plugin is the starting point to create plugins for retrospec. Its a widget for creating widgets!
5
+ Use the plugin to generate the retrospec plugin layout, along with basic tests and documentation.
6
+
7
+
8
+
9
+
10
+ ## Contributing to retrospec-plugin
11
+
12
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
13
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
14
+ * Fork the project.
15
+ * Start a feature/bugfix branch.
16
+ * Commit and push until you are happy with your contribution.
17
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
18
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
19
+
20
+ ## Copyright
21
+
22
+ Copyright (c) 2015 Corey Osman. See LICENSE.txt for
23
+ further details.
24
+
data/Rakefile ADDED
@@ -0,0 +1,50 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
17
+ gem.name = "retrospec-plugingen"
18
+ gem.homepage = "https://github.com/nwops/retrospec-plugingen"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{Generates the retrospec plugin scaffolding for retrospec plugins}
21
+ gem.description = ''
22
+ gem.email = "corey@logicminds.biz"
23
+ gem.authors = ["Corey Osman"]
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Jeweler::RubygemsDotOrgTasks.new
27
+
28
+ require 'rspec/core'
29
+ require 'rspec/core/rake_task'
30
+ RSpec::Core::RakeTask.new(:spec) do |spec|
31
+ spec.pattern = FileList['spec/**/*_spec.rb']
32
+ end
33
+
34
+ desc "Code coverage detail"
35
+ task :simplecov do
36
+ ENV['COVERAGE'] = "true"
37
+ Rake::Task['spec'].execute
38
+ end
39
+
40
+ task :default => :spec
41
+
42
+ require 'rdoc/task'
43
+ Rake::RDocTask.new do |rdoc|
44
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
45
+
46
+ rdoc.rdoc_dir = 'rdoc'
47
+ rdoc.title = "retrospec-plugingen #{version}"
48
+ rdoc.rdoc_files.include('README*')
49
+ rdoc.rdoc_files.include('lib/**/*.rb')
50
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
@@ -0,0 +1 @@
1
+ require 'retrospec/plugins/v1/plugin/plugin_gen'
@@ -0,0 +1,52 @@
1
+ require 'retrospec/plugins/v1/module_helpers'
2
+ require 'retrospec/plugins/v1'
3
+ require_relative 'spec_object'
4
+
5
+ # this plugin will generate the necessary scaffolding in order to build your own
6
+ # retrospec plugin.
7
+ module Retrospec
8
+ module Plugins
9
+ module V1
10
+ class PluginGen
11
+ attr_reader :template_dir, :module_path, :config_data, :context
12
+
13
+ include Retrospec::Plugins::V1::ModuleHelpers
14
+
15
+ def initialize(supplied_module_path=nil,config={})
16
+ @config_data = config
17
+ @module_path = File.expand_path(supplied_module_path)
18
+ @context = ::PluginGen::SpecObject.new(module_path, config)
19
+ end
20
+
21
+ def run
22
+ safe_create_module_files(template_dir, module_path, context)
23
+ create_main_file
24
+ create_plugin_file
25
+ end
26
+
27
+ private
28
+
29
+ def plugin_name
30
+ context.plugin_name
31
+ end
32
+
33
+ def create_main_file
34
+ file_path = File.join(module_path, 'lib', "retrospec-#{plugin_name}.rb" )
35
+ template = File.join(template_dir, 'retrospec-main-plugin-file.rb.erb' )
36
+ safe_create_template_file(file_path, template, context)
37
+ end
38
+
39
+ def create_plugin_file
40
+ file_path = File.join(module_path, 'lib', 'retrospec', 'plugins', 'v1', 'plugin', "#{plugin_name}.rb" )
41
+ template = File.join(template_dir, 'plugin-name.rb.erb' )
42
+ safe_create_template_file(file_path, template, context)
43
+ end
44
+
45
+ # the template directory located inside this plugin gem
46
+ def template_dir
47
+ @template_dir ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,29 @@
1
+ require 'facets'
2
+
3
+ module PluginGen
4
+
5
+ class SpecObject
6
+ attr_reader :instance, :module_path, :capitalized_plugin_name, :plugin_name, :snakecase_plugin_name
7
+
8
+ def initialize(mod_path, data)
9
+ @instance = data
10
+ @module_path = mod_path
11
+ end
12
+
13
+ def snakecase_plugin_name
14
+ @snakecase_plugin_name ||= plugin_name.snakecase
15
+ end
16
+
17
+ def capitalized_plugin_name
18
+ @capitalized_plugin_name ||= plugin_name.capitalize
19
+ end
20
+
21
+ def plugin_name
22
+ @plugin_name ||= instance[:name]
23
+ end
24
+
25
+ def get_binding
26
+ binding
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,49 @@
1
+ # rcov generated
2
+ coverage
3
+ coverage.data
4
+
5
+ # rdoc generated
6
+ rdoc
7
+
8
+ # yard generated
9
+ doc
10
+ .yardoc
11
+
12
+ # bundler
13
+ .bundle
14
+
15
+ # jeweler generated
16
+ pkg
17
+
18
+ # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
19
+ #
20
+ # * Create a file at ~/.gitignore
21
+ # * Include files you want ignored
22
+ # * Run: git config --global core.excludesfile ~/.gitignore
23
+ #
24
+ # After doing this, these files will be ignored in all your git projects,
25
+ # saving you from having to 'pollute' every project you touch with them
26
+ #
27
+ # Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
28
+ #
29
+ # For MacOS:
30
+ #
31
+ #.DS_Store
32
+
33
+ # For TextMate
34
+ #*.tmproj
35
+ #tmtags
36
+
37
+ # For emacs:
38
+ #*~
39
+ #\#*
40
+ #.\#*
41
+
42
+ # For vim:
43
+ #*.swp
44
+
45
+ # For redcar:
46
+ #.redcar
47
+
48
+ # For rubinius:
49
+ #*.rbc
@@ -0,0 +1,11 @@
1
+ source "http://rubygems.org"
2
+
3
+ group :development do
4
+ gem "rspec", "~> 3.2"
5
+ gem "rdoc", "~> 3.12"
6
+ gem "bundler", "~> 1.0"
7
+ gem "jeweler", "~> 2.0.1"
8
+ gem "simplecov", ">= 0"
9
+ gem "pry"
10
+ end
11
+ gem 'retrospec', :git => 'https://github.com/nwops/retrospec.git'
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2015
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,26 @@
1
+ # retrospec-<%= plugin_name %>
2
+
3
+ Description goes here.
4
+
5
+ ## Testing
6
+
7
+ ```shell
8
+ bundle install
9
+ bundle exec rake spec
10
+ ```
11
+
12
+ ## Contributing to retrospec-<%= plugin_name %>
13
+
14
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
15
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
16
+ * Fork the project.
17
+ * Start a feature/bugfix branch.
18
+ * Commit and push until you are happy with your contribution.
19
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
20
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
21
+
22
+ ## Copyright
23
+
24
+ Copyright (c) 2015. See LICENSE.txt for
25
+ further details.
26
+
@@ -0,0 +1,50 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
17
+ gem.name = "retrospec-<%= plugin_name %>"
18
+ gem.homepage = ""
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{TODO quick summary of your plugin}
21
+ gem.description = %Q{TODO: longer description of your gem}
22
+ gem.email = "you@somebody.com"
23
+ gem.authors = ["your name"]
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Jeweler::RubygemsDotOrgTasks.new
27
+
28
+ require 'rspec/core'
29
+ require 'rspec/core/rake_task'
30
+ RSpec::Core::RakeTask.new(:spec) do |spec|
31
+ spec.pattern = FileList['spec/**/*_spec.rb']
32
+ end
33
+
34
+ desc "Code coverage detail"
35
+ task :simplecov do
36
+ ENV['COVERAGE'] = "true"
37
+ Rake::Task['spec'].execute
38
+ end
39
+
40
+ task :default => :spec
41
+
42
+ require 'rdoc/task'
43
+ Rake::RDocTask.new do |rdoc|
44
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
45
+
46
+ rdoc.rdoc_dir = 'rdoc'
47
+ rdoc.title = "retrospec-<%= plugin_name %> #{version}"
48
+ rdoc.rdoc_files.include('README*')
49
+ rdoc.rdoc_files.include('lib/**/*.rb')
50
+ end
@@ -0,0 +1,23 @@
1
+ module <%= capitalized_plugin_name %>
2
+
3
+ class SpecObject
4
+ attr_reader :instance, :module_path, :module_name
5
+
6
+ def initialize(mod_path, data)
7
+ @instance = data
8
+ @module_path = mod_path
9
+ end
10
+
11
+ def module_path
12
+ @module_path
13
+ end
14
+
15
+ def module_name
16
+ instance[:name]
17
+ end
18
+
19
+ def get_binding
20
+ binding
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,28 @@
1
+ require 'spec_helper'
2
+ require 'retrospec'
3
+
4
+ describe "<%= plugin_name %>" do
5
+ let(:plugin) do
6
+ Retrospec::Plugins::V1::<%= capitalized_plugin_name %>.new('/tmp/testplugin_dir', {:name => 'testplugin', :config1 => 'test'})
7
+ end
8
+
9
+ it "can create plugin instance" do
10
+ expect(plugin).to be_a Retrospec::Plugins::V1::<%= capitalized_plugin_name %>
11
+ end
12
+
13
+ it 'can get config data' do
14
+ expect(plugin.config_data[:config1]).to eq('test')
15
+ end
16
+
17
+ it 'can module_path from context' do
18
+ expect(plugin.context.module_path).to eq('/tmp/testplugin_dir')
19
+ end
20
+
21
+ it 'can get module name' do
22
+ expect(plugin.context.module_name).to eq('testplugin')
23
+ end
24
+
25
+ it 'can run without error' do
26
+ expect{plugin.run}.to_not raise_error
27
+ end
28
+ end
@@ -0,0 +1,29 @@
1
+ require 'simplecov'
2
+
3
+ module SimpleCov::Configuration
4
+ def clean_filters
5
+ @filters = []
6
+ end
7
+ end
8
+
9
+ SimpleCov.configure do
10
+ clean_filters
11
+ load_adapter 'test_frameworks'
12
+ end
13
+
14
+ ENV["COVERAGE"] && SimpleCov.start do
15
+ add_filter "/.rvm/"
16
+ end
17
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
18
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
19
+
20
+ require 'rspec'
21
+ require '<%= "retrospec-#{plugin_name}" %>'
22
+
23
+ # Requires supporting files with custom matchers and macros, etc,
24
+ # in ./support/ and its subdirectories.
25
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
26
+
27
+ RSpec.configure do |config|
28
+
29
+ end
@@ -0,0 +1,30 @@
1
+ require 'retrospec/plugins/v1/module_helpers'
2
+ require 'retrospec/plugins/v1'
3
+ require_relative 'spec_object'
4
+
5
+ module Retrospec
6
+ module Plugins
7
+ module V1
8
+ class <%= capitalized_plugin_name %>
9
+ attr_reader :template_dir, :module_path, :config_data, :context
10
+
11
+ include Retrospec::Plugins::V1::ModuleHelpers
12
+
13
+ def initialize(supplied_module_path=nil,config={})
14
+ @config_data = config
15
+ @module_path = File.expand_path(supplied_module_path)
16
+ @context = ::<%= capitalized_plugin_name %>::SpecObject.new(module_path, config)
17
+ end
18
+
19
+ def run
20
+ safe_create_module_files(template_dir, module_path, context)
21
+ end
22
+
23
+ # the template directory located inside the retrospec gem
24
+ def template_dir
25
+ @template_dir ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1 @@
1
+ require 'retrospec/plugins/v1/plugin/<%= plugin_name %>'
@@ -0,0 +1,86 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "retrospec-plugingen"
8
+ s.version = "0.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Corey Osman"]
12
+ s.date = "2015-09-25"
13
+ s.description = ""
14
+ s.email = "corey@logicminds.biz"
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.md"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".rspec",
22
+ "Gemfile",
23
+ "Gemfile.lock",
24
+ "LICENSE.txt",
25
+ "README.md",
26
+ "Rakefile",
27
+ "VERSION",
28
+ "lib/retrospec-plugingen.rb",
29
+ "lib/retrospec/plugins/v1/plugin/plugin_gen.rb",
30
+ "lib/retrospec/plugins/v1/plugin/spec_object.rb",
31
+ "lib/retrospec/plugins/v1/plugin/templates/module_files/.gitignore",
32
+ "lib/retrospec/plugins/v1/plugin/templates/module_files/.rspec",
33
+ "lib/retrospec/plugins/v1/plugin/templates/module_files/Gemfile",
34
+ "lib/retrospec/plugins/v1/plugin/templates/module_files/LICENSE.txt",
35
+ "lib/retrospec/plugins/v1/plugin/templates/module_files/README.md",
36
+ "lib/retrospec/plugins/v1/plugin/templates/module_files/Rakefile",
37
+ "lib/retrospec/plugins/v1/plugin/templates/module_files/lib/retrospec/plugins/v1/plugin/spec_object.rb.erb",
38
+ "lib/retrospec/plugins/v1/plugin/templates/module_files/spec/plugin_spec.rb.erb",
39
+ "lib/retrospec/plugins/v1/plugin/templates/module_files/spec/spec_helper.rb",
40
+ "lib/retrospec/plugins/v1/plugin/templates/plugin-name.rb.erb",
41
+ "lib/retrospec/plugins/v1/plugin/templates/retrospec-main-plugin-file.rb.erb",
42
+ "retrospec-plugingen.gemspec",
43
+ "spec/plugin_gen_spec.rb",
44
+ "spec/retrospec-plugin_spec.rb",
45
+ "spec/spec_helper.rb"
46
+ ]
47
+ s.homepage = "https://github.com/nwops/retrospec-plugingen"
48
+ s.licenses = ["MIT"]
49
+ s.require_paths = ["lib"]
50
+ s.rubygems_version = "2.0.14"
51
+ s.summary = "Generates the retrospec plugin scaffolding for retrospec plugins"
52
+
53
+ if s.respond_to? :specification_version then
54
+ s.specification_version = 4
55
+
56
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
57
+ s.add_runtime_dependency(%q<retrospec>, [">= 0"])
58
+ s.add_runtime_dependency(%q<facets>, [">= 0"])
59
+ s.add_development_dependency(%q<rspec>, ["~> 3.2"])
60
+ s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
61
+ s.add_development_dependency(%q<bundler>, ["~> 1.0"])
62
+ s.add_development_dependency(%q<jeweler>, ["~> 2.0.1"])
63
+ s.add_development_dependency(%q<simplecov>, [">= 0"])
64
+ s.add_development_dependency(%q<pry>, [">= 0"])
65
+ else
66
+ s.add_dependency(%q<retrospec>, [">= 0"])
67
+ s.add_dependency(%q<facets>, [">= 0"])
68
+ s.add_dependency(%q<rspec>, ["~> 3.2"])
69
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
70
+ s.add_dependency(%q<bundler>, ["~> 1.0"])
71
+ s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
72
+ s.add_dependency(%q<simplecov>, [">= 0"])
73
+ s.add_dependency(%q<pry>, [">= 0"])
74
+ end
75
+ else
76
+ s.add_dependency(%q<retrospec>, [">= 0"])
77
+ s.add_dependency(%q<facets>, [">= 0"])
78
+ s.add_dependency(%q<rspec>, ["~> 3.2"])
79
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
80
+ s.add_dependency(%q<bundler>, ["~> 1.0"])
81
+ s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
82
+ s.add_dependency(%q<simplecov>, [">= 0"])
83
+ s.add_dependency(%q<pry>, [">= 0"])
84
+ end
85
+ end
86
+
@@ -0,0 +1,32 @@
1
+ require 'spec_helper'
2
+ require 'retrospec'
3
+
4
+ describe "RetrospecPlugin" do
5
+ let(:gen) do
6
+ Retrospec::Plugins::V1::PluginGen.new('/tmp/testplugin_dir', {:name => 'testplugin', :config1 => 'test'})
7
+ end
8
+
9
+ it "can create plugin instance" do
10
+ expect(gen).to be_a Retrospec::Plugins::V1::PluginGen
11
+ end
12
+
13
+ it 'can get config data' do
14
+ expect(gen.config_data[:config1]).to eq('test')
15
+ end
16
+
17
+ it 'can module_path from context' do
18
+ expect(gen.context.module_path).to eq('/tmp/testplugin_dir')
19
+ end
20
+
21
+ it 'can get module name' do
22
+ expect(gen.context.plugin_name).to eq('testplugin')
23
+ end
24
+
25
+ it 'can get capital module name' do
26
+ expect(gen.context.capitalized_plugin_name).to eq('Testplugin')
27
+ end
28
+
29
+ it 'can run without error' do
30
+ expect{gen.run}.to_not raise_error
31
+ end
32
+ end
@@ -0,0 +1,10 @@
1
+ require 'spec_helper'
2
+
3
+ describe "RetrospecPlugin" do
4
+ let(:gen) do
5
+ Retrospec::Plugins::V1::PluginGen.new('/tmp')
6
+ end
7
+ it "can create plugin instance" do
8
+ expect(gen).to be_a Retrospec::Plugins::V1::PluginGen
9
+ end
10
+ end
@@ -0,0 +1,29 @@
1
+ require 'simplecov'
2
+
3
+ module SimpleCov::Configuration
4
+ def clean_filters
5
+ @filters = []
6
+ end
7
+ end
8
+
9
+ SimpleCov.configure do
10
+ clean_filters
11
+ load_adapter 'test_frameworks'
12
+ end
13
+
14
+ ENV["COVERAGE"] && SimpleCov.start do
15
+ add_filter "/.rvm/"
16
+ end
17
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
18
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
19
+
20
+ require 'rspec'
21
+ require 'retrospec-plugingen'
22
+
23
+ # Requires supporting files with custom matchers and macros, etc,
24
+ # in ./support/ and its subdirectories.
25
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
26
+
27
+ RSpec.configure do |config|
28
+
29
+ end
metadata ADDED
@@ -0,0 +1,183 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: retrospec-plugingen
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Corey Osman
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-09-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: retrospec
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: facets
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
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.2'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '3.2'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rdoc
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '3.12'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '3.12'
69
+ - !ruby/object:Gem::Dependency
70
+ name: bundler
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: '1.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: '1.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: jeweler
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: 2.0.1
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: 2.0.1
97
+ - !ruby/object:Gem::Dependency
98
+ name: simplecov
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: pry
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ description: ''
126
+ email: corey@logicminds.biz
127
+ executables: []
128
+ extensions: []
129
+ extra_rdoc_files:
130
+ - LICENSE.txt
131
+ - README.md
132
+ files:
133
+ - .document
134
+ - .rspec
135
+ - Gemfile
136
+ - Gemfile.lock
137
+ - LICENSE.txt
138
+ - README.md
139
+ - Rakefile
140
+ - VERSION
141
+ - lib/retrospec-plugingen.rb
142
+ - lib/retrospec/plugins/v1/plugin/plugin_gen.rb
143
+ - lib/retrospec/plugins/v1/plugin/spec_object.rb
144
+ - lib/retrospec/plugins/v1/plugin/templates/module_files/.gitignore
145
+ - lib/retrospec/plugins/v1/plugin/templates/module_files/.rspec
146
+ - lib/retrospec/plugins/v1/plugin/templates/module_files/Gemfile
147
+ - lib/retrospec/plugins/v1/plugin/templates/module_files/LICENSE.txt
148
+ - lib/retrospec/plugins/v1/plugin/templates/module_files/README.md
149
+ - lib/retrospec/plugins/v1/plugin/templates/module_files/Rakefile
150
+ - lib/retrospec/plugins/v1/plugin/templates/module_files/lib/retrospec/plugins/v1/plugin/spec_object.rb.erb
151
+ - lib/retrospec/plugins/v1/plugin/templates/module_files/spec/plugin_spec.rb.erb
152
+ - lib/retrospec/plugins/v1/plugin/templates/module_files/spec/spec_helper.rb
153
+ - lib/retrospec/plugins/v1/plugin/templates/plugin-name.rb.erb
154
+ - lib/retrospec/plugins/v1/plugin/templates/retrospec-main-plugin-file.rb.erb
155
+ - retrospec-plugingen.gemspec
156
+ - spec/plugin_gen_spec.rb
157
+ - spec/retrospec-plugin_spec.rb
158
+ - spec/spec_helper.rb
159
+ homepage: https://github.com/nwops/retrospec-plugingen
160
+ licenses:
161
+ - MIT
162
+ metadata: {}
163
+ post_install_message:
164
+ rdoc_options: []
165
+ require_paths:
166
+ - lib
167
+ required_ruby_version: !ruby/object:Gem::Requirement
168
+ requirements:
169
+ - - '>='
170
+ - !ruby/object:Gem::Version
171
+ version: '0'
172
+ required_rubygems_version: !ruby/object:Gem::Requirement
173
+ requirements:
174
+ - - '>='
175
+ - !ruby/object:Gem::Version
176
+ version: '0'
177
+ requirements: []
178
+ rubyforge_project:
179
+ rubygems_version: 2.0.14
180
+ signing_key:
181
+ specification_version: 4
182
+ summary: Generates the retrospec plugin scaffolding for retrospec plugins
183
+ test_files: []