flynn 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -4,4 +4,5 @@ Gemfile.lock
4
4
  pkg/*
5
5
  .DS_Store
6
6
  coverage.data
7
- coverage
7
+ coverage
8
+ tmp/*
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Luke Chadwick"]
10
10
  s.email = ["luke.a.chadwick@gmail.com"]
11
- s.homepage = ""
11
+ s.homepage = "http://github.com/vertis/flynn"
12
12
  s.summary = %q{Flynn helps create ruby projects of different types}
13
13
  s.description = %q{Whenever I start a new ruby project, I usually find myself repeating the same setup steps.
14
14
  Flynn is a tool to help create common project types with sane defaults. }
@@ -5,6 +5,7 @@ require 'flynn/recipes/node_web'
5
5
  require 'flynn/recipes/rails2'
6
6
  require 'flynn/recipes/rails3'
7
7
  require 'flynn/recipes/rails_edge'
8
+ require 'flynn/recipes/refinerycms'
8
9
  require 'flynn/recipes/sinatra'
9
10
 
10
11
  module Flynn
@@ -0,0 +1,17 @@
1
+ require 'fileutils'
2
+
3
+ module Flynn
4
+ module Recipes
5
+ class Refinerycms < RvmBase
6
+ def create(app_name, options=[])
7
+ RVM.gemset_create app_name
8
+ RVM.gemset_use! app_name
9
+
10
+ run("gem install refinerycms --no-rdoc --no-ri")
11
+ puts "Creating #{app_name}"
12
+ run("rvm gemset use #{app_name} && refinerycms #{app_name} #{options.join(" ")}")
13
+ create_project_rvmrc(app_name)
14
+ end
15
+ end
16
+ end
17
+ end
@@ -1,3 +1,3 @@
1
1
  module Flynn
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -7,7 +7,7 @@ describe Flynn::Recipes::Basic do
7
7
  end
8
8
 
9
9
  it "should create a new basic project with the correct name" do
10
- Dir.chdir('tmp')
10
+ Dir.chdir(Dir.tmpdir)
11
11
  subject.create('my_directory')
12
12
  File.exists?('my_directory').should be_true
13
13
  FileUtils.rm_r('my_directory')
@@ -8,7 +8,7 @@ describe Flynn::Recipes::Gem do
8
8
 
9
9
  context "creating a gem project" do
10
10
  before(:all) do
11
- Dir.chdir('tmp')
11
+ Dir.chdir(Dir.tmpdir)
12
12
  subject.create('my_gem')
13
13
  end
14
14
 
@@ -7,7 +7,7 @@ describe Flynn::Recipes::NodeWeb do
7
7
 
8
8
  context "creating a node web project" do
9
9
  before(:all) do
10
- Dir.chdir('tmp')
10
+ Dir.chdir(Dir.tmpdir)
11
11
  subject.create('my_node')
12
12
  end
13
13
 
@@ -8,7 +8,7 @@ describe Flynn::Recipes::Rails2 do
8
8
 
9
9
  context "creating a rails2 project" do
10
10
  before(:all) do
11
- Dir.chdir('tmp')
11
+ Dir.chdir(Dir.tmpdir)
12
12
  subject.create('my_rails2')
13
13
  end
14
14
 
@@ -8,7 +8,7 @@ describe Flynn::Recipes::Rails3 do
8
8
 
9
9
  context "creating a rails3 project" do
10
10
  before(:all) do
11
- Dir.chdir('tmp')
11
+ Dir.chdir(Dir.tmpdir)
12
12
  subject.create('my_rails3')
13
13
  end
14
14
 
@@ -8,7 +8,7 @@ describe Flynn::Recipes::RailsEdge do
8
8
 
9
9
  context "creating a rails edge project" do
10
10
  before(:all) do
11
- Dir.chdir('tmp')
11
+ Dir.chdir(Dir.tmpdir)
12
12
  subject.create('my_edge')
13
13
  end
14
14
 
@@ -0,0 +1,28 @@
1
+ require 'spec_helper'
2
+ require 'fileutils'
3
+
4
+ describe Flynn::Recipes::Refinerycms do
5
+ it "should have a create method" do
6
+ subject.should respond_to(:create)
7
+ end
8
+
9
+ context "creating a refinerycms project" do
10
+ before(:all) do
11
+ Dir.chdir('tmp')
12
+ subject.create('my_refinerycms')
13
+ end
14
+
15
+ after(:all) do
16
+ FileUtils.rm_r('my_refinerycms')
17
+ Dir.chdir('..')
18
+ end
19
+
20
+ it "should create a new refinerycms project with the correct name" do
21
+ File.exists?('my_refinerycms').should be_true
22
+ end
23
+
24
+ it "should create an .rvmrc for the new application" do
25
+ File.exists?('my_refinerycms/.rvmrc').should be_true
26
+ end
27
+ end
28
+ end
@@ -8,7 +8,7 @@ describe Flynn::Recipes::Sinatra do
8
8
 
9
9
  context "creating a sinatra project" do
10
10
  before(:all) do
11
- Dir.chdir('tmp')
11
+ Dir.chdir(Dir.tmpdir)
12
12
  subject.create('my_sinatra')
13
13
  end
14
14
 
@@ -18,6 +18,7 @@ describe Flynn::Recipes do
18
18
  end
19
19
 
20
20
  it "should return a list of all defined recipes" do
21
- Flynn::Recipes.available_recipes.should == [:Gem, :Basic, :Rails2, :Rails3, :RailsEdge, :Sinatra, :Test]
21
+ # TODO: This is a bit of a clunky spec
22
+ Flynn::Recipes.available_recipes.should == [:Basic, :Gem, :NodeWeb, :Rails2, :Rails3, :RailsEdge, :Sinatra, :Test]
22
23
  end
23
24
  end
@@ -1,6 +1,7 @@
1
1
  $:.push File.expand_path("../lib", __FILE__)
2
2
  require 'cover_me'
3
3
  require "flynn"
4
+ require 'tmpdir'
4
5
 
5
6
  RSpec.configure do |config|
6
7
  # config.after(:suite) do
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: flynn
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.8
5
+ version: 0.0.9
6
6
  platform: ruby
7
7
  authors:
8
8
  - Luke Chadwick
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-04 00:00:00 Z
13
+ date: 2011-06-12 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -85,6 +85,7 @@ files:
85
85
  - lib/flynn/recipes/rails2.rb
86
86
  - lib/flynn/recipes/rails3.rb
87
87
  - lib/flynn/recipes/rails_edge.rb
88
+ - lib/flynn/recipes/refinerycms.rb
88
89
  - lib/flynn/recipes/rvm_base.rb
89
90
  - lib/flynn/recipes/sinatra.rb
90
91
  - lib/flynn/version.rb
@@ -96,11 +97,13 @@ files:
96
97
  - spec/flynn/recipes/rails2_spec.rb
97
98
  - spec/flynn/recipes/rails3_spec.rb
98
99
  - spec/flynn/recipes/rails_edge_spec.rb
100
+ - spec/flynn/recipes/refinerycms_spec.rb
99
101
  - spec/flynn/recipes/sinatra_spec.rb
100
102
  - spec/flynn/recipes_spec.rb
101
103
  - spec/flynn_spec.rb
102
104
  - spec/spec_helper.rb
103
- homepage: ""
105
+ - tmp/.gitkeep
106
+ homepage: http://github.com/vertis/flynn
104
107
  licenses: []
105
108
 
106
109
  post_install_message:
@@ -136,6 +139,7 @@ test_files:
136
139
  - spec/flynn/recipes/rails2_spec.rb
137
140
  - spec/flynn/recipes/rails3_spec.rb
138
141
  - spec/flynn/recipes/rails_edge_spec.rb
142
+ - spec/flynn/recipes/refinerycms_spec.rb
139
143
  - spec/flynn/recipes/sinatra_spec.rb
140
144
  - spec/flynn/recipes_spec.rb
141
145
  - spec/flynn_spec.rb