yhara-moneyrail 0.0.2
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/.gitignore +5 -0
- data/.gitmodules +6 -0
- data/Changelog +21 -0
- data/README +1 -0
- data/Rakefile +32 -0
- data/VERSION +1 -0
- data/app/controllers/accounts_controller.rb +99 -0
- data/app/controllers/application_controller.rb +10 -0
- data/app/controllers/categories_controller.rb +99 -0
- data/app/controllers/home_controller.rb +31 -0
- data/app/controllers/items_controller.rb +105 -0
- data/app/controllers/logs_controller.rb +20 -0
- data/app/helpers/accounts_helper.rb +2 -0
- data/app/helpers/application_helper.rb +3 -0
- data/app/helpers/categories_helper.rb +2 -0
- data/app/helpers/home_helper.rb +2 -0
- data/app/helpers/items_helper.rb +2 -0
- data/app/helpers/logs_helper.rb +42 -0
- data/app/models/account.rb +12 -0
- data/app/models/category.rb +26 -0
- data/app/models/expense.rb +2 -0
- data/app/models/income.rb +2 -0
- data/app/models/item.rb +31 -0
- data/app/models/move.rb +37 -0
- data/app/models/simple_item.rb +27 -0
- data/app/views/accounts/edit.html.erb +16 -0
- data/app/views/accounts/index.html.erb +24 -0
- data/app/views/accounts/new.html.erb +15 -0
- data/app/views/accounts/show.html.erb +8 -0
- data/app/views/categories/edit.html.erb +20 -0
- data/app/views/categories/index.html.erb +26 -0
- data/app/views/categories/new.html.erb +19 -0
- data/app/views/categories/show.html.erb +13 -0
- data/app/views/home/index.html.erb +15 -0
- data/app/views/items/edit.html.erb +45 -0
- data/app/views/items/index.html.erb +38 -0
- data/app/views/items/new.html.erb +40 -0
- data/app/views/items/show.html.erb +3 -0
- data/app/views/layouts/application.html.erb +37 -0
- data/app/views/logs/view.html.erb +120 -0
- data/config/boot.rb +110 -0
- data/config/database.yml +25 -0
- data/config/environment.rb +41 -0
- data/config/environments/cucumber.rb +21 -0
- data/config/environments/development.rb +17 -0
- data/config/environments/production.rb +28 -0
- data/config/environments/test.rb +28 -0
- data/config/initializers/backtrace_silencers.rb +7 -0
- data/config/initializers/inflections.rb +10 -0
- data/config/initializers/mime_types.rb +5 -0
- data/config/initializers/new_rails_defaults.rb +19 -0
- data/config/initializers/session_store.rb +15 -0
- data/config/locales/en.yml +5 -0
- data/config/routes.rb +80 -0
- data/db/migrate/20090802070406_create_accounts.rb +14 -0
- data/db/migrate/20090802073601_create_categories.rb +15 -0
- data/db/migrate/20090804065900_create_items.rb +26 -0
- data/doc/README_FOR_APP +2 -0
- data/features/step_definitions/webrat_steps.rb +129 -0
- data/features/support/env.rb +37 -0
- data/features/support/paths.rb +27 -0
- data/lib/tasks/cucumber.rake +20 -0
- data/lib/tasks/rspec.rake +182 -0
- data/main.rb +5 -0
- data/moneyrail.gemspec +170 -0
- data/public/404.html +30 -0
- data/public/422.html +30 -0
- data/public/500.html +30 -0
- data/public/favicon.ico +0 -0
- data/public/images/rails.png +0 -0
- data/public/javascripts/application.js +2 -0
- data/public/javascripts/controls.js +963 -0
- data/public/javascripts/dragdrop.js +973 -0
- data/public/javascripts/editor.js +188 -0
- data/public/javascripts/effects.js +1128 -0
- data/public/javascripts/jquery-ui.js +160 -0
- data/public/javascripts/jquery.js +32 -0
- data/public/javascripts/prototype.js +4320 -0
- data/public/robots.txt +5 -0
- data/public/stylesheets/editor.less +67 -0
- data/script/about +4 -0
- data/script/autospec +6 -0
- data/script/console +3 -0
- data/script/cucumber +8 -0
- data/script/dbconsole +3 -0
- data/script/destroy +3 -0
- data/script/generate +3 -0
- data/script/performance/benchmarker +3 -0
- data/script/performance/profiler +3 -0
- data/script/plugin +3 -0
- data/script/runner +3 -0
- data/script/server +3 -0
- data/script/spec +10 -0
- data/script/spec_server +9 -0
- data/spec/_fixtures/accounts.yml +5 -0
- data/spec/_fixtures/categories.yml +19 -0
- data/spec/_fixtures/incomes.yml +7 -0
- data/spec/_fixtures/items.yml +7 -0
- data/spec/fixtures/accounts.yml +11 -0
- data/spec/fixtures/categories.yml +24 -0
- data/spec/fixtures/items.yml +82 -0
- data/spec/helpers/accounts_helper_spec.rb +11 -0
- data/spec/helpers/categories_helper_spec.rb +11 -0
- data/spec/helpers/items_helper_spec.rb +11 -0
- data/spec/models/account_spec.rb +13 -0
- data/spec/models/category_spec.rb +9 -0
- data/spec/models/income_spec.rb +9 -0
- data/spec/models/item_spec.rb +13 -0
- data/spec/rcov.opts +2 -0
- data/spec/spec.opts +4 -0
- data/spec/spec_helper.rb +51 -0
- data/vendor/plugins/acts_as_list/README +23 -0
- data/vendor/plugins/acts_as_list/init.rb +3 -0
- data/vendor/plugins/acts_as_list/lib/active_record/acts/list.rb +256 -0
- data/vendor/plugins/acts_as_list/test/list_test.rb +332 -0
- data/vendor/plugins/less/LICENCE +20 -0
- data/vendor/plugins/less/README +52 -0
- data/vendor/plugins/less/init.rb +19 -0
- data/vendor/plugins/less/lib/less_for_rails.rb +37 -0
- data/vendor/plugins/less/test/less_for_rails_test.rb +15 -0
- metadata +201 -0
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 August Lilleaas
|
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.
|
@@ -0,0 +1,52 @@
|
|
1
|
+
--~~ Less for Rails ~~--
|
2
|
+
|
3
|
+
A plug-and-play hook for the fabulous Less CSS syntax, http://lesscss.org/.
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
-- Usage --
|
11
|
+
|
12
|
+
1. Install the gem, `gem install less`
|
13
|
+
2. Install the plugin,
|
14
|
+
`script/plugin install git://github.com/augustl/less-for-rails.git`
|
15
|
+
3. Create public/stylesheets/yourfile.less
|
16
|
+
4. Use <%= stylesheet_link_tag "yourfile" %> in the views, as normal.
|
17
|
+
|
18
|
+
It will generate one .css for each .less
|
19
|
+
in public/stylesheets.
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
-- It knows about production mode --
|
27
|
+
|
28
|
+
In production mode, it only compiles the CSS when
|
29
|
+
the application boots.
|
30
|
+
|
31
|
+
In development mode, it compiles the CSS all the
|
32
|
+
time, so that you can edit your .less and reload
|
33
|
+
the site to see how it looks. It is very fabolous,
|
34
|
+
and the plugin has won many prizes for this.
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
-- Git --
|
40
|
+
|
41
|
+
Are you using Less for all your stylesheets? Perhaps
|
42
|
+
you should add `public/stylesheets/*.css` to your
|
43
|
+
.gitignore.
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
-- Me --
|
51
|
+
|
52
|
+
I am August Lilleaas. http://august.lilleaas.net/
|
@@ -0,0 +1,19 @@
|
|
1
|
+
begin
|
2
|
+
config.gem "less"
|
3
|
+
require 'less'
|
4
|
+
rescue LoadError
|
5
|
+
puts "Please install the Less gem, `gem install less`."
|
6
|
+
end
|
7
|
+
|
8
|
+
case Rails.env
|
9
|
+
when "test"
|
10
|
+
# Do nothing
|
11
|
+
when "production"
|
12
|
+
# Compile less when the application loads
|
13
|
+
config.after_initialize do
|
14
|
+
LessForRails.run(:compress => true)
|
15
|
+
end
|
16
|
+
else
|
17
|
+
# Compile less on every request
|
18
|
+
ActionController::Base.before_filter { LessForRails.run }
|
19
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
module LessForRails
|
3
|
+
STYLESHEET_PATHS = []
|
4
|
+
STYLESHEET_PATHS << "#{Rails.root}/public/stylesheets"
|
5
|
+
HEADER = %{/*
|
6
|
+
This file was auto generated by Less (http://lesscss.org), using
|
7
|
+
the less-for-rails plugin (http://github.com/augustl/less-for-rails).
|
8
|
+
|
9
|
+
To change the contents of this file, edit %s.less instead.
|
10
|
+
*/
|
11
|
+
|
12
|
+
}
|
13
|
+
extend self
|
14
|
+
|
15
|
+
# Converts all public/stylesheets/*.less to public/stylesheets/*.css.
|
16
|
+
#
|
17
|
+
# Options:
|
18
|
+
# compress - Remove all newlines? `true` or `false`.
|
19
|
+
def run(options = {})
|
20
|
+
less_sheets = STYLESHEET_PATHS.map {|p| Dir["#{p}/*.less"] }.flatten
|
21
|
+
less_sheets.each {|less|
|
22
|
+
engine = Less::Engine.new(File.read(less))
|
23
|
+
css = Less.version > "1.0" ? engine.to_css : engine.to_css(:desc)
|
24
|
+
css = css.delete("\n") if options[:compress]
|
25
|
+
|
26
|
+
destination_file = File.basename(less, File.extname(less))
|
27
|
+
destination_directory = "#{Rails.root}/public/stylesheets"
|
28
|
+
destination_path = "#{destination_directory}/#{destination_file}.css"
|
29
|
+
|
30
|
+
FileUtils.mkdir_p(destination_directory)
|
31
|
+
File.open(destination_path, "w") {|file|
|
32
|
+
file.write HEADER % [destination_file] if Rails.env == "development"
|
33
|
+
file.write css
|
34
|
+
}
|
35
|
+
}
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
|
3
|
+
class LessForRailsTest < Test::Unit::TestCase
|
4
|
+
def test_existence_of_unicorns
|
5
|
+
assert 5 == 3
|
6
|
+
end
|
7
|
+
|
8
|
+
def test_there_is_a_god
|
9
|
+
assert true
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_what_is_there_to_test_really
|
13
|
+
assert "nothing!"
|
14
|
+
end
|
15
|
+
end
|
metadata
ADDED
@@ -0,0 +1,201 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: yhara-moneyrail
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Yutaka HARA
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-08-20 00:00:00 -07:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rails
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - "="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 2.3.3
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: ruby-station-runtime
|
27
|
+
type: :runtime
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.0.2
|
34
|
+
version:
|
35
|
+
description: Household account book, written in Rails
|
36
|
+
email: yutaka.hara/at/gmail.com
|
37
|
+
executables: []
|
38
|
+
|
39
|
+
extensions: []
|
40
|
+
|
41
|
+
extra_rdoc_files:
|
42
|
+
- README
|
43
|
+
files:
|
44
|
+
- .gitignore
|
45
|
+
- .gitmodules
|
46
|
+
- Changelog
|
47
|
+
- README
|
48
|
+
- Rakefile
|
49
|
+
- VERSION
|
50
|
+
- app/controllers/accounts_controller.rb
|
51
|
+
- app/controllers/application_controller.rb
|
52
|
+
- app/controllers/categories_controller.rb
|
53
|
+
- app/controllers/home_controller.rb
|
54
|
+
- app/controllers/items_controller.rb
|
55
|
+
- app/controllers/logs_controller.rb
|
56
|
+
- app/helpers/accounts_helper.rb
|
57
|
+
- app/helpers/application_helper.rb
|
58
|
+
- app/helpers/categories_helper.rb
|
59
|
+
- app/helpers/home_helper.rb
|
60
|
+
- app/helpers/items_helper.rb
|
61
|
+
- app/helpers/logs_helper.rb
|
62
|
+
- app/models/account.rb
|
63
|
+
- app/models/category.rb
|
64
|
+
- app/models/expense.rb
|
65
|
+
- app/models/income.rb
|
66
|
+
- app/models/item.rb
|
67
|
+
- app/models/move.rb
|
68
|
+
- app/models/simple_item.rb
|
69
|
+
- app/views/accounts/edit.html.erb
|
70
|
+
- app/views/accounts/index.html.erb
|
71
|
+
- app/views/accounts/new.html.erb
|
72
|
+
- app/views/accounts/show.html.erb
|
73
|
+
- app/views/categories/edit.html.erb
|
74
|
+
- app/views/categories/index.html.erb
|
75
|
+
- app/views/categories/new.html.erb
|
76
|
+
- app/views/categories/show.html.erb
|
77
|
+
- app/views/home/index.html.erb
|
78
|
+
- app/views/items/edit.html.erb
|
79
|
+
- app/views/items/index.html.erb
|
80
|
+
- app/views/items/new.html.erb
|
81
|
+
- app/views/items/show.html.erb
|
82
|
+
- app/views/layouts/application.html.erb
|
83
|
+
- app/views/logs/view.html.erb
|
84
|
+
- config/boot.rb
|
85
|
+
- config/database.yml
|
86
|
+
- config/environment.rb
|
87
|
+
- config/environments/cucumber.rb
|
88
|
+
- config/environments/development.rb
|
89
|
+
- config/environments/production.rb
|
90
|
+
- config/environments/test.rb
|
91
|
+
- config/initializers/backtrace_silencers.rb
|
92
|
+
- config/initializers/inflections.rb
|
93
|
+
- config/initializers/mime_types.rb
|
94
|
+
- config/initializers/new_rails_defaults.rb
|
95
|
+
- config/initializers/session_store.rb
|
96
|
+
- config/locales/en.yml
|
97
|
+
- config/routes.rb
|
98
|
+
- db/migrate/20090802070406_create_accounts.rb
|
99
|
+
- db/migrate/20090802073601_create_categories.rb
|
100
|
+
- db/migrate/20090804065900_create_items.rb
|
101
|
+
- db/production.sqlite3
|
102
|
+
- doc/README_FOR_APP
|
103
|
+
- features/step_definitions/webrat_steps.rb
|
104
|
+
- features/support/env.rb
|
105
|
+
- features/support/paths.rb
|
106
|
+
- lib/tasks/cucumber.rake
|
107
|
+
- lib/tasks/rspec.rake
|
108
|
+
- main.rb
|
109
|
+
- moneyrail.gemspec
|
110
|
+
- public/404.html
|
111
|
+
- public/422.html
|
112
|
+
- public/500.html
|
113
|
+
- public/favicon.ico
|
114
|
+
- public/images/rails.png
|
115
|
+
- public/javascripts/application.js
|
116
|
+
- public/javascripts/controls.js
|
117
|
+
- public/javascripts/dragdrop.js
|
118
|
+
- public/javascripts/editor.js
|
119
|
+
- public/javascripts/effects.js
|
120
|
+
- public/javascripts/jquery-ui.js
|
121
|
+
- public/javascripts/jquery.js
|
122
|
+
- public/javascripts/prototype.js
|
123
|
+
- public/robots.txt
|
124
|
+
- public/stylesheets/editor.less
|
125
|
+
- public/stylesheets/scaffold.css
|
126
|
+
- script/about
|
127
|
+
- script/autospec
|
128
|
+
- script/console
|
129
|
+
- script/cucumber
|
130
|
+
- script/dbconsole
|
131
|
+
- script/destroy
|
132
|
+
- script/generate
|
133
|
+
- script/performance/benchmarker
|
134
|
+
- script/performance/profiler
|
135
|
+
- script/plugin
|
136
|
+
- script/runner
|
137
|
+
- script/server
|
138
|
+
- script/spec
|
139
|
+
- script/spec_server
|
140
|
+
- spec/_fixtures/accounts.yml
|
141
|
+
- spec/_fixtures/categories.yml
|
142
|
+
- spec/_fixtures/incomes.yml
|
143
|
+
- spec/_fixtures/items.yml
|
144
|
+
- spec/fixtures/accounts.yml
|
145
|
+
- spec/fixtures/categories.yml
|
146
|
+
- spec/fixtures/items.yml
|
147
|
+
- spec/helpers/accounts_helper_spec.rb
|
148
|
+
- spec/helpers/categories_helper_spec.rb
|
149
|
+
- spec/helpers/items_helper_spec.rb
|
150
|
+
- spec/models/account_spec.rb
|
151
|
+
- spec/models/category_spec.rb
|
152
|
+
- spec/models/income_spec.rb
|
153
|
+
- spec/models/item_spec.rb
|
154
|
+
- spec/rcov.opts
|
155
|
+
- spec/spec.opts
|
156
|
+
- spec/spec_helper.rb
|
157
|
+
- vendor/plugins/acts_as_list/README
|
158
|
+
- vendor/plugins/acts_as_list/init.rb
|
159
|
+
- vendor/plugins/acts_as_list/lib/active_record/acts/list.rb
|
160
|
+
- vendor/plugins/acts_as_list/test/list_test.rb
|
161
|
+
- vendor/plugins/less/LICENCE
|
162
|
+
- vendor/plugins/less/README
|
163
|
+
- vendor/plugins/less/init.rb
|
164
|
+
- vendor/plugins/less/lib/less_for_rails.rb
|
165
|
+
- vendor/plugins/less/test/less_for_rails_test.rb
|
166
|
+
has_rdoc: false
|
167
|
+
homepage: http://github.com/yhara/moneyrail
|
168
|
+
licenses:
|
169
|
+
post_install_message:
|
170
|
+
rdoc_options:
|
171
|
+
- --charset=UTF-8
|
172
|
+
require_paths:
|
173
|
+
- lib
|
174
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
175
|
+
requirements:
|
176
|
+
- - ">="
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: "0"
|
179
|
+
version:
|
180
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
181
|
+
requirements:
|
182
|
+
- - ">="
|
183
|
+
- !ruby/object:Gem::Version
|
184
|
+
version: "0"
|
185
|
+
version:
|
186
|
+
requirements: []
|
187
|
+
|
188
|
+
rubyforge_project:
|
189
|
+
rubygems_version: 1.3.5
|
190
|
+
signing_key:
|
191
|
+
specification_version: 3
|
192
|
+
summary: Household account book, written in Rails
|
193
|
+
test_files:
|
194
|
+
- spec/helpers/accounts_helper_spec.rb
|
195
|
+
- spec/helpers/categories_helper_spec.rb
|
196
|
+
- spec/helpers/items_helper_spec.rb
|
197
|
+
- spec/models/account_spec.rb
|
198
|
+
- spec/models/category_spec.rb
|
199
|
+
- spec/models/income_spec.rb
|
200
|
+
- spec/models/item_spec.rb
|
201
|
+
- spec/spec_helper.rb
|