interfacelift 0.0.1 → 0.1.0

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.
@@ -0,0 +1,5 @@
1
+ require File.dirname(__FILE__) + '/spec_helper'
2
+
3
+ include InterfaceLift
4
+ describe Fetcher do
5
+ end
@@ -5,12 +5,12 @@ describe InterfaceLift::Installer do
5
5
  before(:each) do
6
6
  @path = "/tmp"
7
7
  @theme = "test_theme"
8
- @theme_path = "#{GEM_ROOT}/lib/templates/#{@theme}"
8
+ @theme_path = "#{ENV['HOME']}/.interfacelift/#{@theme}"
9
9
  end
10
10
 
11
11
  def valid_arguments
12
- File.should_receive(:directory?).with("#{@path}/public").and_return(true)
13
- File.should_receive(:directory?).with(@theme_path).and_return(true)
12
+ File.expects(:directory?).with("#{@path}/public").returns(true)
13
+ File.expects(:directory?).with(@theme_path).returns(true)
14
14
  end
15
15
 
16
16
  describe "Initialization" do
@@ -23,14 +23,14 @@ describe InterfaceLift::Installer do
23
23
  end
24
24
 
25
25
  it "Should raise an error when there the theme is not available" do
26
- File.should_receive(:directory?).with("#{@path}/public").and_return(true)
27
- File.should_receive(:directory?).with(@theme_path).and_return(false)
26
+ File.expects(:directory?).with("#{@path}/public").returns(true)
27
+ File.expects(:directory?).with(@theme_path).returns(false)
28
28
  lambda { Installer.new(@path,@theme) }.should raise_error("Theme #{@theme} is not available.")
29
29
  end
30
30
 
31
31
 
32
32
  it "Should raise an error when the given path does not contain a rails app " do
33
- File.should_receive(:directory?).with("#{@path}/public").and_return(false)
33
+ File.expects(:directory?).with("#{@path}/public").returns(false)
34
34
  lambda { Installer.new(@path,@theme) }.should raise_error("Given path does not contain a rails app.")
35
35
  end
36
36
  end
@@ -40,9 +40,9 @@ describe InterfaceLift::Installer do
40
40
  #don't copy files over!
41
41
  valid_arguments
42
42
  @installer = Installer.new(@path,@theme)
43
- File.stub!(:directory?).and_return(true)
44
- Dir.stub!(:glob).and_return([])
45
- FileUtils.stub!(:cp_r)
43
+ File.stubs(:directory?).returns(true)
44
+ Dir.stubs(:glob).returns([])
45
+ FileUtils.stubs(:cp_r)
46
46
  end
47
47
 
48
48
  after(:each) do
@@ -51,24 +51,21 @@ describe InterfaceLift::Installer do
51
51
  end
52
52
 
53
53
  it "Should copy over existing images to the RAILS_ROOT/public folder" do
54
- FileUtils.should_receive(:cp_r).with("#{@theme_path}/public/images","#{@path}/public")
54
+ FileUtils.expects(:cp_r).with("#{@theme_path}/public/images","#{@path}/public")
55
55
  end
56
56
 
57
57
  it "Should copy over existing stylesheets to the RAILS_ROOT/public folder" do
58
- FileUtils.should_receive(:cp_r).with("#{@theme_path}/public/stylesheets","#{@path}/public")
58
+ FileUtils.expects(:cp_r).with("#{@theme_path}/public/stylesheets","#{@path}/public")
59
59
  end
60
60
 
61
61
  it "Should copy over templates to the RAILS_ROOT/app/views/layout folder" do
62
- FileUtils.should_receive(:cp_r).with("#{@theme_path}/app/views/layouts","#{@path}/app/views")
62
+ FileUtils.expects(:cp_r).with("#{@theme_path}/app/views/layouts","#{@path}/app/views")
63
63
  end
64
64
 
65
65
  it "Should copy over javascripts to the RAILS_ROOT/public folder" do
66
- FileUtils.should_receive(:cp_r).with("#{@theme_path}/public/javascripts","#{@path}/public")
66
+ FileUtils.expects(:cp_r).with("#{@theme_path}/public/javascripts","#{@path}/public")
67
67
  end
68
-
69
- it "Should copy over shared resources to the RAILS_ROOT/public folder" do
70
- FileUtils.should_receive(:cp_r).with("#{GEM_ROOT}/lib/templates/shared/icons","#{@path}/public/images/")
71
- end
68
+
72
69
 
73
70
  end
74
71
 
@@ -3,6 +3,10 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
3
3
  describe InterfaceLift do
4
4
  it "Should have a version" do
5
5
  InterfaceLift::VERSION.should_not be_nil
6
+ end
7
+
8
+ it "Should have a DEFAULT_CATALOG_PATH" do
9
+ InterfaceLift::DEFAULT_CATALOG_PATH.should == "#{ENV["HOME"]}/.interfacelift"
6
10
  end
7
11
 
8
12
  it "Should have an Installer class" do
@@ -4,7 +4,8 @@ GEM_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
4
4
 
5
5
  $LOAD_PATH << "#{GEM_ROOT}/lib"
6
6
  require "interfacelift"
7
-
8
- require 'rubygems'
9
- #stubbing and mocking
10
- require 'mocha'
7
+ #gem "mocha"
8
+
9
+ Spec::Runner.configure do |config|
10
+ config.mock_with :mocha
11
+ end
metadata CHANGED
@@ -1,17 +1,38 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: interfacelift
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michel de Graaf
8
+ - Jeroen van Schagen
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
12
 
12
- date: 2009-10-28 00:00:00 +01:00
13
+ date: 2009-11-19 00:00:00 +01:00
13
14
  default_executable: interfacelift
14
15
  dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: commander
18
+ type: :runtime
19
+ version_requirement:
20
+ version_requirements: !ruby/object:Gem::Requirement
21
+ requirements:
22
+ - - ">="
23
+ - !ruby/object:Gem::Version
24
+ version: "0"
25
+ version:
26
+ - !ruby/object:Gem::Dependency
27
+ name: git
28
+ type: :runtime
29
+ version_requirement:
30
+ version_requirements: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: "0"
35
+ version:
15
36
  - !ruby/object:Gem::Dependency
16
37
  name: thoughtbot-shoulda
17
38
  type: :development
@@ -22,21 +43,25 @@ dependencies:
22
43
  - !ruby/object:Gem::Version
23
44
  version: "0"
24
45
  version:
25
- description: Collection of cool layouts to use in your rails apps.
46
+ description: Installs themes and other layout/interface related resources
26
47
  email: michel@re-invention.nl
27
48
  executables:
28
49
  - interfacelift
29
50
  extensions: []
30
51
 
31
- extra_rdoc_files: []
32
-
52
+ extra_rdoc_files:
53
+ - README.rdoc
33
54
  files:
34
55
  - .DS_Store
35
56
  - .gitignore
57
+ - README.rdoc
36
58
  - Rakefile
37
59
  - VERSION
38
60
  - bin/interfacelift
61
+ - docs/todo.txt
39
62
  - lib/.DS_Store
63
+ - lib/catalog.rb
64
+ - lib/fetcher.rb
40
65
  - lib/installer.rb
41
66
  - lib/interfacelift.rb
42
67
  - lib/templates/.DS_Store
@@ -1325,6 +1350,28 @@ files:
1325
1350
  - lib/templates/web_app/public/stylesheets/style.css
1326
1351
  - lib/templates/web_app/public/stylesheets/thickbox.css
1327
1352
  - lib/theme_manager.rb
1353
+ - rdoc/classes/InterfaceLift.html
1354
+ - rdoc/classes/InterfaceLift/Catalog.html
1355
+ - rdoc/classes/InterfaceLift/Fetcher.html
1356
+ - rdoc/classes/InterfaceLift/Installer.html
1357
+ - rdoc/classes/InterfaceLift/ThemeManager.html
1358
+ - rdoc/created.rid
1359
+ - rdoc/files/lib/catalog_rb.html
1360
+ - rdoc/files/lib/fetcher_rb.html
1361
+ - rdoc/files/lib/installer_rb.html
1362
+ - rdoc/files/lib/interfacelift_rb.html
1363
+ - rdoc/files/lib/templates/bright_admin/install_rb.html
1364
+ - rdoc/files/lib/theme_manager_rb.html
1365
+ - rdoc/fr_class_index.html
1366
+ - rdoc/fr_file_index.html
1367
+ - rdoc/fr_method_index.html
1368
+ - rdoc/index.html
1369
+ - rdoc/rdoc-style.css
1370
+ - spec/assets/README
1371
+ - spec/assets/test_theme/README
1372
+ - spec/assets/test_theme2/README
1373
+ - spec/catalog_spec.rb
1374
+ - spec/fetcher_spec.rb
1328
1375
  - spec/installer_spec.rb
1329
1376
  - spec/interfacelift_spec.rb
1330
1377
  - spec/spec.opts
@@ -1358,6 +1405,8 @@ signing_key:
1358
1405
  specification_version: 3
1359
1406
  summary: Installs templates in rails applications
1360
1407
  test_files:
1408
+ - spec/catalog_spec.rb
1409
+ - spec/fetcher_spec.rb
1361
1410
  - spec/installer_spec.rb
1362
1411
  - spec/interfacelift_spec.rb
1363
1412
  - spec/spec_helper.rb