hirb 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +8 -2
- data/Rakefile +23 -41
- data/gemspec +20 -0
- data/lib/bond/completions/hirb.rb +14 -0
- data/lib/hirb.rb +0 -3
- data/lib/hirb/helpers/table.rb +1 -1
- data/lib/hirb/version.rb +1 -1
- data/test/auto_table_test.rb +25 -27
- data/test/bacon_extensions.rb +26 -0
- data/test/console_test.rb +7 -9
- data/test/dynamic_view_test.rb +71 -77
- data/test/formatter_test.rb +39 -37
- data/test/hirb_test.rb +8 -8
- data/test/import_test.rb +4 -4
- data/test/menu_test.rb +42 -42
- data/test/object_table_test.rb +65 -67
- data/test/pager_test.rb +133 -135
- data/test/resizer_test.rb +48 -47
- data/test/table_test.rb +69 -70
- data/test/test_helper.rb +11 -7
- data/test/tree_test.rb +34 -46
- data/test/util_test.rb +57 -59
- data/test/view_test.rb +138 -140
- data/test/views_test.rb +8 -10
- metadata +66 -36
data/test/views_test.rb
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), 'test_helper')
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
end
|
3
|
+
describe "activerecord table" do
|
4
|
+
it "with no select gets default options" do
|
5
|
+
pet = stub(:name=>'rufus', :age=>7, :attributes=>{"name"=>'rufus', 'age'=>7}, :class=>stub(:column_names=>%w{age name}))
|
6
|
+
Helpers::AutoTable.active_record__base_view(pet).should == {:fields=>[:age, :name]}
|
7
|
+
end
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
end
|
9
|
+
it "with select gets default options" do
|
10
|
+
pet = stub(:name=>'rufus', :age=>7, :attributes=>{'name'=>'rufus'}, :class=>stub(:column_names=>%w{age name}))
|
11
|
+
Helpers::AutoTable.active_record__base_view(pet).should == {:fields=>[:name]}
|
14
12
|
end
|
15
13
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 2
|
9
|
+
version: 0.3.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Gabriel Horner
|
@@ -14,10 +14,48 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-05-19 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
|
-
dependencies:
|
20
|
-
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: bacon
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 0
|
30
|
+
version: "0"
|
31
|
+
type: :development
|
32
|
+
version_requirements: *id001
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: mocha
|
35
|
+
prerelease: false
|
36
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
37
|
+
none: false
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 0
|
43
|
+
version: "0"
|
44
|
+
type: :development
|
45
|
+
version_requirements: *id002
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: mocha-on-bacon
|
48
|
+
prerelease: false
|
49
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
segments:
|
55
|
+
- 0
|
56
|
+
version: "0"
|
57
|
+
type: :development
|
58
|
+
version_requirements: *id003
|
21
59
|
description: Hirb currently provides a mini view framework for console applications, designed to improve irb's default output. Hirb improves console output by providing a smart pager and auto-formatting output. The smart pager detects when an output exceeds a screenful and thus only pages output as needed. Auto-formatting adds a view to an output's class. This is helpful in separating views from content (MVC anyone?). The framework encourages reusing views by letting you package them in classes and associate them with any number of output classes.
|
22
60
|
email: gabriel.horner@gmail.com
|
23
61
|
executables: []
|
@@ -25,26 +63,22 @@ executables: []
|
|
25
63
|
extensions: []
|
26
64
|
|
27
65
|
extra_rdoc_files:
|
28
|
-
- LICENSE.txt
|
29
66
|
- README.rdoc
|
30
|
-
files:
|
31
|
-
- CHANGELOG.rdoc
|
32
67
|
- LICENSE.txt
|
33
|
-
|
34
|
-
-
|
35
|
-
- lib/hirb.rb
|
68
|
+
files:
|
69
|
+
- lib/bond/completions/hirb.rb
|
36
70
|
- lib/hirb/console.rb
|
37
71
|
- lib/hirb/dynamic_view.rb
|
38
72
|
- lib/hirb/formatter.rb
|
39
|
-
- lib/hirb/helpers.rb
|
40
73
|
- lib/hirb/helpers/auto_table.rb
|
41
74
|
- lib/hirb/helpers/object_table.rb
|
42
75
|
- lib/hirb/helpers/parent_child_tree.rb
|
43
|
-
- lib/hirb/helpers/table.rb
|
44
76
|
- lib/hirb/helpers/table/filters.rb
|
45
77
|
- lib/hirb/helpers/table/resizer.rb
|
78
|
+
- lib/hirb/helpers/table.rb
|
46
79
|
- lib/hirb/helpers/tree.rb
|
47
80
|
- lib/hirb/helpers/vertical_table.rb
|
81
|
+
- lib/hirb/helpers.rb
|
48
82
|
- lib/hirb/import_object.rb
|
49
83
|
- lib/hirb/menu.rb
|
50
84
|
- lib/hirb/pager.rb
|
@@ -52,13 +86,15 @@ files:
|
|
52
86
|
- lib/hirb/util.rb
|
53
87
|
- lib/hirb/version.rb
|
54
88
|
- lib/hirb/view.rb
|
55
|
-
- lib/hirb/views.rb
|
56
89
|
- lib/hirb/views/couch_db.rb
|
57
90
|
- lib/hirb/views/misc_db.rb
|
58
91
|
- lib/hirb/views/mongo_db.rb
|
59
92
|
- lib/hirb/views/orm.rb
|
60
93
|
- lib/hirb/views/rails.rb
|
94
|
+
- lib/hirb/views.rb
|
95
|
+
- lib/hirb.rb
|
61
96
|
- test/auto_table_test.rb
|
97
|
+
- test/bacon_extensions.rb
|
62
98
|
- test/console_test.rb
|
63
99
|
- test/dynamic_view_test.rb
|
64
100
|
- test/formatter_test.rb
|
@@ -74,16 +110,22 @@ files:
|
|
74
110
|
- test/util_test.rb
|
75
111
|
- test/view_test.rb
|
76
112
|
- test/views_test.rb
|
113
|
+
- LICENSE.txt
|
114
|
+
- CHANGELOG.rdoc
|
115
|
+
- README.rdoc
|
116
|
+
- Rakefile
|
117
|
+
- gemspec
|
77
118
|
has_rdoc: true
|
78
119
|
homepage: http://tagaholic.me/hirb/
|
79
120
|
licenses: []
|
80
121
|
|
81
122
|
post_install_message:
|
82
|
-
rdoc_options:
|
83
|
-
|
123
|
+
rdoc_options: []
|
124
|
+
|
84
125
|
require_paths:
|
85
126
|
- lib
|
86
127
|
required_ruby_version: !ruby/object:Gem::Requirement
|
128
|
+
none: false
|
87
129
|
requirements:
|
88
130
|
- - ">="
|
89
131
|
- !ruby/object:Gem::Version
|
@@ -91,33 +133,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
91
133
|
- 0
|
92
134
|
version: "0"
|
93
135
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
|
+
none: false
|
94
137
|
requirements:
|
95
138
|
- - ">="
|
96
139
|
- !ruby/object:Gem::Version
|
97
140
|
segments:
|
98
|
-
-
|
99
|
-
|
141
|
+
- 1
|
142
|
+
- 3
|
143
|
+
- 6
|
144
|
+
version: 1.3.6
|
100
145
|
requirements: []
|
101
146
|
|
102
147
|
rubyforge_project: tagaholic
|
103
|
-
rubygems_version: 1.3.
|
148
|
+
rubygems_version: 1.3.7
|
104
149
|
signing_key:
|
105
150
|
specification_version: 3
|
106
151
|
summary: A mini view framework for console/irb that's easy to use, even while under its influence.
|
107
|
-
test_files:
|
108
|
-
|
109
|
-
- test/console_test.rb
|
110
|
-
- test/dynamic_view_test.rb
|
111
|
-
- test/formatter_test.rb
|
112
|
-
- test/hirb_test.rb
|
113
|
-
- test/import_test.rb
|
114
|
-
- test/menu_test.rb
|
115
|
-
- test/object_table_test.rb
|
116
|
-
- test/pager_test.rb
|
117
|
-
- test/resizer_test.rb
|
118
|
-
- test/table_test.rb
|
119
|
-
- test/test_helper.rb
|
120
|
-
- test/tree_test.rb
|
121
|
-
- test/util_test.rb
|
122
|
-
- test/view_test.rb
|
123
|
-
- test/views_test.rb
|
152
|
+
test_files: []
|
153
|
+
|