padrino-admin 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.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
data/.gitignore ADDED
@@ -0,0 +1,21 @@
1
+ ## MAC OS
2
+ .DS_Store
3
+
4
+ ## TEXTMATE
5
+ *.tmproj
6
+ tmtags
7
+
8
+ ## EMACS
9
+ *~
10
+ \#*
11
+ .\#*
12
+
13
+ ## VIM
14
+ *.swp
15
+
16
+ ## PROJECT::GENERAL
17
+ coverage
18
+ rdoc
19
+ pkg
20
+
21
+ ## PROJECT::SPECIFIC
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 Padrino
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.rdoc ADDED
@@ -0,0 +1,7 @@
1
+ = padrino-admin
2
+
3
+ Description goes here.
4
+
5
+ == Copyright
6
+
7
+ Copyright (c) 2009 Padrino. See LICENSE for details.
data/Rakefile ADDED
@@ -0,0 +1,58 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "padrino-admin"
8
+ gem.summary = "Admin Dashboard for Padrino"
9
+ gem.description = "Admin View for Padrino applications"
10
+ gem.email = "nesquena@gmail.com"
11
+ gem.homepage = "http://github.com/padrino/padrino-admin"
12
+ gem.authors = ["Padrino Team", "Nathan Esquenazi", "Davide D'Agostino", "Arthur Chiu"]
13
+ gem.add_runtime_dependency "sinatra", ">= 0.9.2"
14
+ gem.add_development_dependency "haml", ">= 2.2.1"
15
+ gem.add_development_dependency "shoulda", ">= 0"
16
+ gem.add_development_dependency "mocha", ">= 0.9.7"
17
+ gem.add_development_dependency "rack-test", ">= 0.5.0"
18
+ gem.add_development_dependency "webrat", ">= 0.5.1"
19
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
20
+ end
21
+ Jeweler::GemcutterTasks.new
22
+ rescue LoadError
23
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
24
+ end
25
+
26
+ require 'rake/testtask'
27
+ Rake::TestTask.new(:test) do |test|
28
+ test.libs << 'lib' << 'test'
29
+ test.pattern = 'test/**/test_*.rb'
30
+ test.verbose = true
31
+ end
32
+
33
+ begin
34
+ require 'rcov/rcovtask'
35
+ Rcov::RcovTask.new do |test|
36
+ test.libs << 'test'
37
+ test.pattern = 'test/**/test_*.rb'
38
+ test.verbose = true
39
+ end
40
+ rescue LoadError
41
+ task :rcov do
42
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
43
+ end
44
+ end
45
+
46
+ task :test => :check_dependencies
47
+
48
+ task :default => :test
49
+
50
+ require 'rake/rdoctask'
51
+ Rake::RDocTask.new do |rdoc|
52
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
53
+
54
+ rdoc.rdoc_dir = 'rdoc'
55
+ rdoc.title = "padrino-admin #{version}"
56
+ rdoc.rdoc_files.include('README*')
57
+ rdoc.rdoc_files.include('lib/**/*.rb')
58
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
File without changes
@@ -0,0 +1,71 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{padrino-admin}
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 = ["Padrino Team", "Nathan Esquenazi", "Davide D'Agostino", "Arthur Chiu"]
12
+ s.date = %q{2009-11-16}
13
+ s.description = %q{Admin View for Padrino applications}
14
+ s.email = %q{nesquena@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".gitignore",
22
+ "LICENSE",
23
+ "README.rdoc",
24
+ "Rakefile",
25
+ "VERSION",
26
+ "lib/padrino-admin.rb",
27
+ "padrino-admin.gemspec",
28
+ "test/active_support_helpers.rb",
29
+ "test/helper.rb",
30
+ "test/test_padrino_admin.rb"
31
+ ]
32
+ s.homepage = %q{http://github.com/padrino/padrino-admin}
33
+ s.rdoc_options = ["--charset=UTF-8"]
34
+ s.require_paths = ["lib"]
35
+ s.rubygems_version = %q{1.3.5}
36
+ s.summary = %q{Admin Dashboard for Padrino}
37
+ s.test_files = [
38
+ "test/active_support_helpers.rb",
39
+ "test/helper.rb",
40
+ "test/test_padrino_admin.rb"
41
+ ]
42
+
43
+ if s.respond_to? :specification_version then
44
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
45
+ s.specification_version = 3
46
+
47
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
48
+ s.add_runtime_dependency(%q<sinatra>, [">= 0.9.2"])
49
+ s.add_development_dependency(%q<haml>, [">= 2.2.1"])
50
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
51
+ s.add_development_dependency(%q<mocha>, [">= 0.9.7"])
52
+ s.add_development_dependency(%q<rack-test>, [">= 0.5.0"])
53
+ s.add_development_dependency(%q<webrat>, [">= 0.5.1"])
54
+ else
55
+ s.add_dependency(%q<sinatra>, [">= 0.9.2"])
56
+ s.add_dependency(%q<haml>, [">= 2.2.1"])
57
+ s.add_dependency(%q<shoulda>, [">= 0"])
58
+ s.add_dependency(%q<mocha>, [">= 0.9.7"])
59
+ s.add_dependency(%q<rack-test>, [">= 0.5.0"])
60
+ s.add_dependency(%q<webrat>, [">= 0.5.1"])
61
+ end
62
+ else
63
+ s.add_dependency(%q<sinatra>, [">= 0.9.2"])
64
+ s.add_dependency(%q<haml>, [">= 2.2.1"])
65
+ s.add_dependency(%q<shoulda>, [">= 0"])
66
+ s.add_dependency(%q<mocha>, [">= 0.9.7"])
67
+ s.add_dependency(%q<rack-test>, [">= 0.5.0"])
68
+ s.add_dependency(%q<webrat>, [">= 0.5.1"])
69
+ end
70
+ end
71
+
@@ -0,0 +1,7 @@
1
+ unless Fixnum.method_defined?(:days)
2
+ require 'active_support/core_ext/object/misc'
3
+ require 'active_support/core_ext/date'
4
+ require 'active_support/core_ext/time'
5
+ require 'active_support/core_ext/numeric'
6
+ require 'active_support/duration'
7
+ end
data/test/helper.rb ADDED
@@ -0,0 +1,74 @@
1
+ require 'rubygems'
2
+ require 'test/unit'
3
+ require 'shoulda'
4
+ require 'mocha'
5
+ require 'rack/test'
6
+ require 'webrat'
7
+
8
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
9
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
10
+ require 'active_support_helpers'
11
+ require File.dirname(__FILE__) + '/../../padrino-helpers/lib/padrino-helpers.rb'
12
+ require File.dirname(__FILE__) + '/../lib/padrino-admin.rb'
13
+
14
+ class Test::Unit::TestCase
15
+ include Padrino::Helpers::OutputHelpers
16
+ include Padrino::Helpers::TagHelpers
17
+ include Padrino::Helpers::AssetTagHelpers
18
+ include Rack::Test::Methods
19
+ include Webrat::Methods
20
+ include Webrat::Matchers
21
+
22
+ Webrat.configure do |config|
23
+ config.mode = :rack
24
+ end
25
+
26
+ def stop_time_for_test
27
+ time = Time.now
28
+ Time.stubs(:now).returns(time)
29
+ return time
30
+ end
31
+
32
+ # assert_has_tag(:h1, :content => "yellow") { "<h1>yellow</h1>" }
33
+ # In this case, block is the html to evaluate
34
+ def assert_has_tag(name, attributes = {}, &block)
35
+ html = block && block.call
36
+ matcher = HaveSelector.new(name, attributes)
37
+ raise "Please specify a block!" if html.blank?
38
+ assert matcher.matches?(html), matcher.failure_message
39
+ end
40
+
41
+ # assert_has_no_tag, tag(:h1, :content => "yellow") { "<h1>green</h1>" }
42
+ # In this case, block is the html to evaluate
43
+ def assert_has_no_tag(name, attributes = {}, &block)
44
+ html = block && block.call
45
+ attributes.merge!(:count => 0)
46
+ matcher = HaveSelector.new(name, attributes)
47
+ raise "Please specify a block!" if html.blank?
48
+ assert matcher.matches?(html), matcher.failure_message
49
+ end
50
+
51
+ # Silences the output by redirecting to stringIO
52
+ # silence_logger { ...commands... } => "...output..."
53
+ def silence_logger(&block)
54
+ orig_stdout = $stdout
55
+ $stdout = log_buffer = StringIO.new
56
+ block.call
57
+ $stdout = orig_stdout
58
+ log_buffer.rewind && log_buffer.read
59
+ end
60
+
61
+ # Asserts that a file matches the pattern
62
+ def assert_match_in_file(pattern, file)
63
+ assert File.exist?(file), "File '#{file}' does not exist!"
64
+ assert_match pattern, File.read(file)
65
+ end
66
+ end
67
+
68
+ module Webrat
69
+ module Logging
70
+ def logger # :nodoc:
71
+ @logger = nil
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,7 @@
1
+ require File.dirname(__FILE__) + '/helper'
2
+
3
+ class TestPadrinoAdmin < Test::Unit::TestCase
4
+ should "probably rename this file and start testing for real" do
5
+ flunk "hey buddy, you should probably rename this file and start testing for real"
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,130 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: padrino-admin
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Padrino Team
8
+ - Nathan Esquenazi
9
+ - Davide D'Agostino
10
+ - Arthur Chiu
11
+ autorequire:
12
+ bindir: bin
13
+ cert_chain: []
14
+
15
+ date: 2009-11-16 00:00:00 -08:00
16
+ default_executable:
17
+ dependencies:
18
+ - !ruby/object:Gem::Dependency
19
+ name: sinatra
20
+ type: :runtime
21
+ version_requirement:
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 0.9.2
27
+ version:
28
+ - !ruby/object:Gem::Dependency
29
+ name: haml
30
+ type: :development
31
+ version_requirement:
32
+ version_requirements: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 2.2.1
37
+ version:
38
+ - !ruby/object:Gem::Dependency
39
+ name: shoulda
40
+ type: :development
41
+ version_requirement:
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: "0"
47
+ version:
48
+ - !ruby/object:Gem::Dependency
49
+ name: mocha
50
+ type: :development
51
+ version_requirement:
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: 0.9.7
57
+ version:
58
+ - !ruby/object:Gem::Dependency
59
+ name: rack-test
60
+ type: :development
61
+ version_requirement:
62
+ version_requirements: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: 0.5.0
67
+ version:
68
+ - !ruby/object:Gem::Dependency
69
+ name: webrat
70
+ type: :development
71
+ version_requirement:
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: 0.5.1
77
+ version:
78
+ description: Admin View for Padrino applications
79
+ email: nesquena@gmail.com
80
+ executables: []
81
+
82
+ extensions: []
83
+
84
+ extra_rdoc_files:
85
+ - LICENSE
86
+ - README.rdoc
87
+ files:
88
+ - .document
89
+ - .gitignore
90
+ - LICENSE
91
+ - README.rdoc
92
+ - Rakefile
93
+ - VERSION
94
+ - lib/padrino-admin.rb
95
+ - padrino-admin.gemspec
96
+ - test/active_support_helpers.rb
97
+ - test/helper.rb
98
+ - test/test_padrino_admin.rb
99
+ has_rdoc: true
100
+ homepage: http://github.com/padrino/padrino-admin
101
+ licenses: []
102
+
103
+ post_install_message:
104
+ rdoc_options:
105
+ - --charset=UTF-8
106
+ require_paths:
107
+ - lib
108
+ required_ruby_version: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: "0"
113
+ version:
114
+ required_rubygems_version: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: "0"
119
+ version:
120
+ requirements: []
121
+
122
+ rubyforge_project:
123
+ rubygems_version: 1.3.5
124
+ signing_key:
125
+ specification_version: 3
126
+ summary: Admin Dashboard for Padrino
127
+ test_files:
128
+ - test/active_support_helpers.rb
129
+ - test/helper.rb
130
+ - test/test_padrino_admin.rb