newgem 0.29.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +15 -1
- data/Manifest.txt +7 -22
- data/README.rdoc +55 -33
- data/Rakefile +22 -7
- data/app_generators/newgem/newgem_generator.rb +23 -23
- data/app_generators/newgem/templates/Rakefile +27 -3
- data/app_generators/newgem/templates/lib/module.rb +1 -1
- data/bin/newgem +12 -2
- data/config/website.yml +2 -0
- data/features/development.feature +22 -0
- data/features/executable_generator.feature +6 -6
- data/features/expected_outputs/newgem.out +2 -9
- data/features/install_cucumber.feature +11 -0
- data/features/install_website.feature +13 -0
- data/features/newgem_cli.feature +60 -0
- data/features/steps/cli.rb +125 -36
- data/features/steps/env.rb +4 -2
- data/lib/newgem/support/tasks.rb +10 -0
- data/lib/newgem/tasks.rb +1 -0
- data/lib/newgem.rb +5 -5
- data/newgem_generators/install_website/install_website_generator.rb +12 -9
- data/newgem_generators/install_website/templates/config/website.yml.sample.erb +2 -0
- data/newgem_generators/install_website/templates/script/txt2html +5 -16
- data/newgem_generators/install_website/templates/tasks/website.rake +34 -4
- data/rubygems_generators/executable/templates/test/test_cli.rb.erb +1 -1
- data/script/txt2html +5 -16
- data/tasks/deployment.rake +5 -6
- data/tasks/website.rake +34 -6
- data/test/test_install_website_generator.rb +1 -0
- data/test/test_newgem_generator.rb +0 -10
- data/website/index.html +27 -22
- data/website/index.txt +30 -19
- data/website/rubyforge.html +2 -2
- data/website/version.js +0 -4
- metadata +35 -67
- data/Todo.txt +0 -4
- data/app_generators/newgem/templates/config/hoe.rb +0 -82
- data/app_generators/newgem/templates/config/requirements.rb +0 -15
- data/app_generators/newgem/templates/lib/version.rb +0 -10
- data/app_generators/newgem/templates/setup.rb +0 -1585
- data/app_generators/newgem/templates/tasks/deployment.rake +0 -34
- data/app_generators/newgem/templates/tasks/environment.rake +0 -7
- data/app_generators/newgem/templates/tasks/website.rake +0 -9
- data/config/hoe.rb +0 -62
- data/features/cli.feature +0 -28
- data/features/steps/executable_generator.rb +0 -0
- data/lib/newgem/version.rb +0 -9
- data/rubygems_generators/install_rspec_stories/USAGE +0 -5
- data/rubygems_generators/install_rspec_stories/install_rspec_stories_generator.rb +0 -54
- data/rubygems_generators/install_rspec_stories/templates/all.rb +0 -8
- data/rubygems_generators/install_rspec_stories/templates/steps.rb +0 -13
- data/rubygems_generators/install_rspec_stories/templates/story.story +0 -9
- data/script/txt2html.rb +0 -70
- data/script/txt2js +0 -59
- data/setup.rb +0 -1585
- data/tasks/generator_report.rake +0 -19
- data/test/test_install_rspec_stories_generator.rb +0 -45
data/tasks/generator_report.rake
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
desc 'Check that files included in generators match those in use by newgem itself'
|
2
|
-
task :generator_report do
|
3
|
-
files = [
|
4
|
-
%w( script/generate app_generators/newgem ),
|
5
|
-
%w( script/destroy app_generators/newgem ),
|
6
|
-
%w( tasks/deployment.rake app_generators/newgem ),
|
7
|
-
%w( tasks/environment.rake app_generators/newgem ),
|
8
|
-
%w( test/test_generator_helper.rb rubygems_generators/component_generator ),
|
9
|
-
%w( tasks/website.rake newgem_generators/website ),
|
10
|
-
]
|
11
|
-
# add "templates/#{source}" to each 2nd string
|
12
|
-
end
|
13
|
-
|
14
|
-
# def identical?(source, destination, &block)
|
15
|
-
# return false if File.directory? destination
|
16
|
-
# source = block_given? ? File.open(source) {|sf| yield(sf)} : IO.read(source)
|
17
|
-
# destination = IO.read(destination)
|
18
|
-
# source == destination
|
19
|
-
# end
|
@@ -1,45 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), "test_generator_helper.rb")
|
2
|
-
|
3
|
-
class TestInstallRspecStoriesGenerator < Test::Unit::TestCase
|
4
|
-
include RubiGen::GeneratorTestHelper
|
5
|
-
|
6
|
-
def setup
|
7
|
-
bare_setup
|
8
|
-
end
|
9
|
-
|
10
|
-
def teardown
|
11
|
-
bare_teardown
|
12
|
-
end
|
13
|
-
|
14
|
-
# Some generator-related assertions:
|
15
|
-
# assert_generated_file(name, &block) # block passed the file contents
|
16
|
-
# assert_directory_exists(name)
|
17
|
-
# assert_generated_class(name, &block)
|
18
|
-
# assert_generated_module(name, &block)
|
19
|
-
# assert_generated_test_for(name, &block)
|
20
|
-
# The assert_generated_(class|module|test_for) &block is passed the body of the class/module within the file
|
21
|
-
# assert_has_method(body, *methods) # check that the body has a list of methods (methods with parentheses not supported yet)
|
22
|
-
#
|
23
|
-
# Other helper methods are:
|
24
|
-
# app_root_files - put this in teardown to show files generated by the test method (e.g. p app_root_files)
|
25
|
-
# bare_setup - place this in setup method to create the APP_ROOT folder for each test
|
26
|
-
# bare_teardown - place this in teardown method to destroy the TMP_ROOT or APP_ROOT folder after each test
|
27
|
-
|
28
|
-
def test_generator_without_options
|
29
|
-
run_generator('install_rspec_stories', [], sources)
|
30
|
-
assert_directory_exists("stories/steps")
|
31
|
-
assert_generated_file("stories/steps/myproject_steps.rb")
|
32
|
-
assert_generated_file("stories/sell_myproject.story")
|
33
|
-
assert_generated_file("stories/all.rb")
|
34
|
-
end
|
35
|
-
|
36
|
-
private
|
37
|
-
def sources
|
38
|
-
[RubiGen::PathSource.new(:test, File.join(File.dirname(__FILE__),"..", generator_path))
|
39
|
-
]
|
40
|
-
end
|
41
|
-
|
42
|
-
def generator_path
|
43
|
-
"rubygems_generators"
|
44
|
-
end
|
45
|
-
end
|