moneyrail 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +13 -0
- data/Gemfile.lock +45 -0
- data/Rakefile +6 -5
- data/VERSION +1 -1
- data/app/helpers/stats_helper.rb +3 -0
- data/app/models/item.rb +3 -2
- data/app/models/move.rb +18 -0
- data/app/models/simple_item.rb +18 -0
- data/app/views/layouts/application.html.erb +15 -6
- data/config/database.yml +7 -11
- data/config/environment.rb +1 -1
- data/db/production.sqlite3 +0 -0
- data/lib/tasks/import.rake +56 -0
- data/moneyrail.gemspec +168 -165
- data/public/stylesheets/scaffold.css +54 -0
- metadata +145 -85
- data/.gitignore +0 -5
- data/lib/tasks/rspec.rake +0 -182
- data/test/functional/notes_controller_test.rb +0 -45
- data/test/unit/helpers/notes_helper_test.rb +0 -4
- data/test/unit/note_test.rb +0 -8
- data/vendor/plugins/less/LICENCE +0 -20
- data/vendor/plugins/less/README +0 -52
- data/vendor/plugins/less/init.rb +0 -19
- data/vendor/plugins/less/lib/less_for_rails.rb +0 -37
- data/vendor/plugins/less/test/less_for_rails_test.rb +0 -15
@@ -1,45 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class NotesControllerTest < ActionController::TestCase
|
4
|
-
test "should get index" do
|
5
|
-
get :index
|
6
|
-
assert_response :success
|
7
|
-
assert_not_nil assigns(:notes)
|
8
|
-
end
|
9
|
-
|
10
|
-
test "should get new" do
|
11
|
-
get :new
|
12
|
-
assert_response :success
|
13
|
-
end
|
14
|
-
|
15
|
-
test "should create note" do
|
16
|
-
assert_difference('Note.count') do
|
17
|
-
post :create, :note => { }
|
18
|
-
end
|
19
|
-
|
20
|
-
assert_redirected_to note_path(assigns(:note))
|
21
|
-
end
|
22
|
-
|
23
|
-
test "should show note" do
|
24
|
-
get :show, :id => notes(:one).to_param
|
25
|
-
assert_response :success
|
26
|
-
end
|
27
|
-
|
28
|
-
test "should get edit" do
|
29
|
-
get :edit, :id => notes(:one).to_param
|
30
|
-
assert_response :success
|
31
|
-
end
|
32
|
-
|
33
|
-
test "should update note" do
|
34
|
-
put :update, :id => notes(:one).to_param, :note => { }
|
35
|
-
assert_redirected_to note_path(assigns(:note))
|
36
|
-
end
|
37
|
-
|
38
|
-
test "should destroy note" do
|
39
|
-
assert_difference('Note.count', -1) do
|
40
|
-
delete :destroy, :id => notes(:one).to_param
|
41
|
-
end
|
42
|
-
|
43
|
-
assert_redirected_to notes_path
|
44
|
-
end
|
45
|
-
end
|
data/test/unit/note_test.rb
DELETED
data/vendor/plugins/less/LICENCE
DELETED
@@ -1,20 +0,0 @@
|
|
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.
|
data/vendor/plugins/less/README
DELETED
@@ -1,52 +0,0 @@
|
|
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/
|
data/vendor/plugins/less/init.rb
DELETED
@@ -1,19 +0,0 @@
|
|
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
|
@@ -1,37 +0,0 @@
|
|
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
|
@@ -1,15 +0,0 @@
|
|
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
|