file_record 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +12 -0
- data/.rvmrc +1 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +107 -0
- data/MIT-LICENSE +20 -0
- data/README.md +66 -0
- data/Rakefile +31 -0
- data/file_record.gemspec +23 -0
- data/lib/file_record/attribute_management.rb +32 -0
- data/lib/file_record/attribute_methods/all.rb +11 -0
- data/lib/file_record/attribute_methods/dirty.rb +22 -0
- data/lib/file_record/attribute_methods/read.rb +24 -0
- data/lib/file_record/attribute_methods/validation.rb +17 -0
- data/lib/file_record/attribute_methods/write.rb +22 -0
- data/lib/file_record/attribute_methods.rb +10 -0
- data/lib/file_record/base.rb +19 -0
- data/lib/file_record/callbacks.rb +20 -0
- data/lib/file_record/compatibility.rb +11 -0
- data/lib/file_record/persistence.rb +53 -0
- data/lib/file_record/validations.rb +15 -0
- data/lib/file_record.rb +9 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/controllers/addresses_controller.rb +83 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/addresses_helper.rb +2 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/models/address.rb +10 -0
- data/test/dummy/app/views/addresses/_form.html.erb +32 -0
- data/test/dummy/app/views/addresses/edit.html.erb +6 -0
- data/test/dummy/app/views/addresses/index.html.erb +25 -0
- data/test/dummy/app/views/addresses/new.html.erb +5 -0
- data/test/dummy/app/views/addresses/show.html.erb +15 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config/application.rb +45 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +22 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +26 -0
- data/test/dummy/config/environments/production.rb +49 -0
- data/test/dummy/config/environments/test.rb +35 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +10 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +60 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +26 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/public/javascripts/application.js +2 -0
- data/test/dummy/public/javascripts/controls.js +965 -0
- data/test/dummy/public/javascripts/dragdrop.js +974 -0
- data/test/dummy/public/javascripts/effects.js +1123 -0
- data/test/dummy/public/javascripts/prototype.js +6001 -0
- data/test/dummy/public/javascripts/rails.js +191 -0
- data/test/dummy/public/stylesheets/.gitkeep +0 -0
- data/test/dummy/public/stylesheets/scaffold.css +56 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/tmp/file_records/.gitkeep +0 -0
- data/test/file_record_test.rb +187 -0
- data/test/integration/navigation_test.rb +7 -0
- data/test/support/integration_case.rb +5 -0
- data/test/test_helper.rb +22 -0
- metadata +201 -0
@@ -0,0 +1,191 @@
|
|
1
|
+
(function() {
|
2
|
+
// Technique from Juriy Zaytsev
|
3
|
+
// http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
|
4
|
+
function isEventSupported(eventName) {
|
5
|
+
var el = document.createElement('div');
|
6
|
+
eventName = 'on' + eventName;
|
7
|
+
var isSupported = (eventName in el);
|
8
|
+
if (!isSupported) {
|
9
|
+
el.setAttribute(eventName, 'return;');
|
10
|
+
isSupported = typeof el[eventName] == 'function';
|
11
|
+
}
|
12
|
+
el = null;
|
13
|
+
return isSupported;
|
14
|
+
}
|
15
|
+
|
16
|
+
function isForm(element) {
|
17
|
+
return Object.isElement(element) && element.nodeName.toUpperCase() == 'FORM'
|
18
|
+
}
|
19
|
+
|
20
|
+
function isInput(element) {
|
21
|
+
if (Object.isElement(element)) {
|
22
|
+
var name = element.nodeName.toUpperCase()
|
23
|
+
return name == 'INPUT' || name == 'SELECT' || name == 'TEXTAREA'
|
24
|
+
}
|
25
|
+
else return false
|
26
|
+
}
|
27
|
+
|
28
|
+
var submitBubbles = isEventSupported('submit'),
|
29
|
+
changeBubbles = isEventSupported('change')
|
30
|
+
|
31
|
+
if (!submitBubbles || !changeBubbles) {
|
32
|
+
// augment the Event.Handler class to observe custom events when needed
|
33
|
+
Event.Handler.prototype.initialize = Event.Handler.prototype.initialize.wrap(
|
34
|
+
function(init, element, eventName, selector, callback) {
|
35
|
+
init(element, eventName, selector, callback)
|
36
|
+
// is the handler being attached to an element that doesn't support this event?
|
37
|
+
if ( (!submitBubbles && this.eventName == 'submit' && !isForm(this.element)) ||
|
38
|
+
(!changeBubbles && this.eventName == 'change' && !isInput(this.element)) ) {
|
39
|
+
// "submit" => "emulated:submit"
|
40
|
+
this.eventName = 'emulated:' + this.eventName
|
41
|
+
}
|
42
|
+
}
|
43
|
+
)
|
44
|
+
}
|
45
|
+
|
46
|
+
if (!submitBubbles) {
|
47
|
+
// discover forms on the page by observing focus events which always bubble
|
48
|
+
document.on('focusin', 'form', function(focusEvent, form) {
|
49
|
+
// special handler for the real "submit" event (one-time operation)
|
50
|
+
if (!form.retrieve('emulated:submit')) {
|
51
|
+
form.on('submit', function(submitEvent) {
|
52
|
+
var emulated = form.fire('emulated:submit', submitEvent, true)
|
53
|
+
// if custom event received preventDefault, cancel the real one too
|
54
|
+
if (emulated.returnValue === false) submitEvent.preventDefault()
|
55
|
+
})
|
56
|
+
form.store('emulated:submit', true)
|
57
|
+
}
|
58
|
+
})
|
59
|
+
}
|
60
|
+
|
61
|
+
if (!changeBubbles) {
|
62
|
+
// discover form inputs on the page
|
63
|
+
document.on('focusin', 'input, select, texarea', function(focusEvent, input) {
|
64
|
+
// special handler for real "change" events
|
65
|
+
if (!input.retrieve('emulated:change')) {
|
66
|
+
input.on('change', function(changeEvent) {
|
67
|
+
input.fire('emulated:change', changeEvent, true)
|
68
|
+
})
|
69
|
+
input.store('emulated:change', true)
|
70
|
+
}
|
71
|
+
})
|
72
|
+
}
|
73
|
+
|
74
|
+
function handleRemote(element) {
|
75
|
+
var method, url, params;
|
76
|
+
|
77
|
+
var event = element.fire("ajax:before");
|
78
|
+
if (event.stopped) return false;
|
79
|
+
|
80
|
+
if (element.tagName.toLowerCase() === 'form') {
|
81
|
+
method = element.readAttribute('method') || 'post';
|
82
|
+
url = element.readAttribute('action');
|
83
|
+
params = element.serialize();
|
84
|
+
} else {
|
85
|
+
method = element.readAttribute('data-method') || 'get';
|
86
|
+
url = element.readAttribute('href');
|
87
|
+
params = {};
|
88
|
+
}
|
89
|
+
|
90
|
+
new Ajax.Request(url, {
|
91
|
+
method: method,
|
92
|
+
parameters: params,
|
93
|
+
evalScripts: true,
|
94
|
+
|
95
|
+
onComplete: function(request) { element.fire("ajax:complete", request); },
|
96
|
+
onSuccess: function(request) { element.fire("ajax:success", request); },
|
97
|
+
onFailure: function(request) { element.fire("ajax:failure", request); }
|
98
|
+
});
|
99
|
+
|
100
|
+
element.fire("ajax:after");
|
101
|
+
}
|
102
|
+
|
103
|
+
function handleMethod(element) {
|
104
|
+
var method = element.readAttribute('data-method'),
|
105
|
+
url = element.readAttribute('href'),
|
106
|
+
csrf_param = $$('meta[name=csrf-param]')[0],
|
107
|
+
csrf_token = $$('meta[name=csrf-token]')[0];
|
108
|
+
|
109
|
+
var form = new Element('form', { method: "POST", action: url, style: "display: none;" });
|
110
|
+
element.parentNode.insert(form);
|
111
|
+
|
112
|
+
if (method !== 'post') {
|
113
|
+
var field = new Element('input', { type: 'hidden', name: '_method', value: method });
|
114
|
+
form.insert(field);
|
115
|
+
}
|
116
|
+
|
117
|
+
if (csrf_param) {
|
118
|
+
var param = csrf_param.readAttribute('content'),
|
119
|
+
token = csrf_token.readAttribute('content'),
|
120
|
+
field = new Element('input', { type: 'hidden', name: param, value: token });
|
121
|
+
form.insert(field);
|
122
|
+
}
|
123
|
+
|
124
|
+
form.submit();
|
125
|
+
}
|
126
|
+
|
127
|
+
|
128
|
+
document.on("click", "*[data-confirm]", function(event, element) {
|
129
|
+
var message = element.readAttribute('data-confirm');
|
130
|
+
if (!confirm(message)) event.stop();
|
131
|
+
});
|
132
|
+
|
133
|
+
document.on("click", "a[data-remote]", function(event, element) {
|
134
|
+
if (event.stopped) return;
|
135
|
+
handleRemote(element);
|
136
|
+
event.stop();
|
137
|
+
});
|
138
|
+
|
139
|
+
document.on("click", "a[data-method]", function(event, element) {
|
140
|
+
if (event.stopped) return;
|
141
|
+
handleMethod(element);
|
142
|
+
event.stop();
|
143
|
+
});
|
144
|
+
|
145
|
+
document.on("submit", function(event) {
|
146
|
+
var element = event.findElement(),
|
147
|
+
message = element.readAttribute('data-confirm');
|
148
|
+
if (message && !confirm(message)) {
|
149
|
+
event.stop();
|
150
|
+
return false;
|
151
|
+
}
|
152
|
+
|
153
|
+
var inputs = element.select("input[type=submit][data-disable-with]");
|
154
|
+
inputs.each(function(input) {
|
155
|
+
input.disabled = true;
|
156
|
+
input.writeAttribute('data-original-value', input.value);
|
157
|
+
input.value = input.readAttribute('data-disable-with');
|
158
|
+
});
|
159
|
+
|
160
|
+
var element = event.findElement("form[data-remote]");
|
161
|
+
if (element) {
|
162
|
+
handleRemote(element);
|
163
|
+
event.stop();
|
164
|
+
}
|
165
|
+
});
|
166
|
+
|
167
|
+
document.on("ajax:after", "form", function(event, element) {
|
168
|
+
var inputs = element.select("input[type=submit][disabled=true][data-disable-with]");
|
169
|
+
inputs.each(function(input) {
|
170
|
+
input.value = input.readAttribute('data-original-value');
|
171
|
+
input.removeAttribute('data-original-value');
|
172
|
+
input.disabled = false;
|
173
|
+
});
|
174
|
+
});
|
175
|
+
|
176
|
+
Ajax.Responders.register({
|
177
|
+
onCreate: function(request) {
|
178
|
+
var csrf_meta_tag = $$('meta[name=csrf-token]')[0];
|
179
|
+
|
180
|
+
if (csrf_meta_tag) {
|
181
|
+
var header = 'X-CSRF-Token',
|
182
|
+
token = csrf_meta_tag.readAttribute('content');
|
183
|
+
|
184
|
+
if (!request.options.requestHeaders) {
|
185
|
+
request.options.requestHeaders = {};
|
186
|
+
}
|
187
|
+
request.options.requestHeaders[header] = token;
|
188
|
+
}
|
189
|
+
}
|
190
|
+
});
|
191
|
+
})();
|
File without changes
|
@@ -0,0 +1,56 @@
|
|
1
|
+
body { background-color: #fff; color: #333; }
|
2
|
+
|
3
|
+
body, p, ol, ul, td {
|
4
|
+
font-family: verdana, arial, helvetica, sans-serif;
|
5
|
+
font-size: 13px;
|
6
|
+
line-height: 18px;
|
7
|
+
}
|
8
|
+
|
9
|
+
pre {
|
10
|
+
background-color: #eee;
|
11
|
+
padding: 10px;
|
12
|
+
font-size: 11px;
|
13
|
+
}
|
14
|
+
|
15
|
+
a { color: #000; }
|
16
|
+
a:visited { color: #666; }
|
17
|
+
a:hover { color: #fff; background-color:#000; }
|
18
|
+
|
19
|
+
div.field, div.actions {
|
20
|
+
margin-bottom: 10px;
|
21
|
+
}
|
22
|
+
|
23
|
+
#notice {
|
24
|
+
color: green;
|
25
|
+
}
|
26
|
+
|
27
|
+
.field_with_errors {
|
28
|
+
padding: 2px;
|
29
|
+
background-color: red;
|
30
|
+
display: table;
|
31
|
+
}
|
32
|
+
|
33
|
+
#error_explanation {
|
34
|
+
width: 450px;
|
35
|
+
border: 2px solid red;
|
36
|
+
padding: 7px;
|
37
|
+
padding-bottom: 0;
|
38
|
+
margin-bottom: 20px;
|
39
|
+
background-color: #f0f0f0;
|
40
|
+
}
|
41
|
+
|
42
|
+
#error_explanation h2 {
|
43
|
+
text-align: left;
|
44
|
+
font-weight: bold;
|
45
|
+
padding: 5px 5px 5px 15px;
|
46
|
+
font-size: 12px;
|
47
|
+
margin: -7px;
|
48
|
+
margin-bottom: 0px;
|
49
|
+
background-color: #c00;
|
50
|
+
color: #fff;
|
51
|
+
}
|
52
|
+
|
53
|
+
#error_explanation ul li {
|
54
|
+
font-size: 12px;
|
55
|
+
list-style: square;
|
56
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
+
|
4
|
+
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
5
|
+
require File.expand_path('../../config/boot', __FILE__)
|
6
|
+
require 'rails/commands'
|
File without changes
|
@@ -0,0 +1,187 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
|
4
|
+
class Address < FileRecord::Base
|
5
|
+
def initialize(attributes ={})
|
6
|
+
super(attributes)
|
7
|
+
end
|
8
|
+
attributes :street, :house_number
|
9
|
+
|
10
|
+
validates :street, :house_number, :presence => true
|
11
|
+
validates :house_number, :numericality => true
|
12
|
+
|
13
|
+
before_save :before_save_callback
|
14
|
+
after_save :after_save_callback
|
15
|
+
before_destroy :before_destroy_callback
|
16
|
+
after_destroy :after_destroy_callback
|
17
|
+
attr_reader :callback_info
|
18
|
+
def before_save_callback
|
19
|
+
@callback_info = "#{@callback_info}a"
|
20
|
+
end
|
21
|
+
def after_save_callback
|
22
|
+
@callback_info = "#{@callback_info}b"
|
23
|
+
end
|
24
|
+
def before_destroy_callback
|
25
|
+
@callback_info = "#{@callback_info}c"
|
26
|
+
end
|
27
|
+
def after_destroy_callback
|
28
|
+
@callback_info = "#{@callback_info}d"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
class FileRecordTest < ActiveSupport::TestCase
|
33
|
+
|
34
|
+
include ActiveModel::Lint::Tests
|
35
|
+
|
36
|
+
def setup
|
37
|
+
@model = Address.new
|
38
|
+
@model.street = "Florianska"
|
39
|
+
@model.house_number = 18
|
40
|
+
@model.id = "pauza"
|
41
|
+
end
|
42
|
+
|
43
|
+
def teardown
|
44
|
+
File.delete("test/dummy/tmp/file_records/pauza") if File.exists?("test/dummy/tmp/file_records/pauza")
|
45
|
+
end
|
46
|
+
|
47
|
+
test "runs callbacks" do
|
48
|
+
x = Address.create({'id' => "kot", 'street' => "Psia", 'house_number' => 4})
|
49
|
+
x.destroy
|
50
|
+
assert x.callback_info == "abcd"
|
51
|
+
end
|
52
|
+
|
53
|
+
test "tracks changes" do
|
54
|
+
assert @model.changed?
|
55
|
+
assert @model.save
|
56
|
+
assert !@model.changed?
|
57
|
+
@model.street = "Florianska"
|
58
|
+
assert !@model.changed?
|
59
|
+
@model.street = "Grodzka"
|
60
|
+
assert @model.changed?
|
61
|
+
assert !Address.find("pauza").changed?
|
62
|
+
@model.reset_street!
|
63
|
+
assert @model.street == "Florianska"
|
64
|
+
#assert !@model.changed?
|
65
|
+
end
|
66
|
+
|
67
|
+
test "can be saved" do
|
68
|
+
assert !@model.persisted?
|
69
|
+
assert @model.save
|
70
|
+
assert @model.persisted?
|
71
|
+
end
|
72
|
+
|
73
|
+
test "saved can be found" do
|
74
|
+
assert @model.save
|
75
|
+
found = Address.find("pauza")
|
76
|
+
assert !found.nil?
|
77
|
+
assert found.street == @model.street
|
78
|
+
assert found.house_number == @model.house_number
|
79
|
+
end
|
80
|
+
|
81
|
+
test "requires name" do
|
82
|
+
@model.clear_id
|
83
|
+
assert !@model.valid?
|
84
|
+
end
|
85
|
+
|
86
|
+
test "saved can be destroyed" do
|
87
|
+
assert @model.save
|
88
|
+
assert @model.destroy
|
89
|
+
assert !@model.persisted?
|
90
|
+
end
|
91
|
+
|
92
|
+
test "can't find not existing" do
|
93
|
+
assert Address.find("nieistniejacy") == nil
|
94
|
+
end
|
95
|
+
|
96
|
+
test "cannot be saved when invalid" do
|
97
|
+
@model.clear_street
|
98
|
+
assert !@model.save
|
99
|
+
assert !@model.persisted?
|
100
|
+
end
|
101
|
+
|
102
|
+
test "attributes can be cleared" do
|
103
|
+
@model.clear_street
|
104
|
+
assert @model.street.nil?
|
105
|
+
@model.clear_house_number
|
106
|
+
assert @model.clear_house_number.nil?
|
107
|
+
end
|
108
|
+
|
109
|
+
test "attributes can be validated" do
|
110
|
+
assert @model.valid?
|
111
|
+
assert @model.is_street_valid?
|
112
|
+
assert @model.is_house_number_valid?
|
113
|
+
|
114
|
+
@model.street = nil
|
115
|
+
|
116
|
+
assert !@model.valid?
|
117
|
+
assert !@model.is_street_valid?
|
118
|
+
assert @model.is_house_number_valid?
|
119
|
+
end
|
120
|
+
|
121
|
+
test "model with proper fields is valid" do
|
122
|
+
assert @model.valid?
|
123
|
+
end
|
124
|
+
|
125
|
+
test "can be (de)serialized" do
|
126
|
+
json = @model.to_json
|
127
|
+
deserialized = Address.new
|
128
|
+
deserialized.from_json json
|
129
|
+
assert deserialized.street == @model.street
|
130
|
+
assert deserialized.house_number == @model.house_number
|
131
|
+
end
|
132
|
+
|
133
|
+
test "model without street in invalid" do
|
134
|
+
@model.street = nil
|
135
|
+
assert !@model.valid?
|
136
|
+
end
|
137
|
+
|
138
|
+
test "model without number is invalid" do
|
139
|
+
@model.house_number = nil
|
140
|
+
assert !@model.valid?
|
141
|
+
end
|
142
|
+
|
143
|
+
test "model with invalid number is invalid" do
|
144
|
+
@model.house_number = "not number"
|
145
|
+
assert !@model.valid?
|
146
|
+
end
|
147
|
+
|
148
|
+
test "Addres is proper kind" do
|
149
|
+
assert_kind_of FileRecord::Base, @model
|
150
|
+
end
|
151
|
+
|
152
|
+
test "Fields are added properly" do
|
153
|
+
assert @model.respond_to?(:street)
|
154
|
+
assert @model.respond_to?(:street=)
|
155
|
+
assert @model.respond_to?(:house_number)
|
156
|
+
assert @model.respond_to?(:house_number=)
|
157
|
+
end
|
158
|
+
|
159
|
+
test "ignores not defined attributes" do
|
160
|
+
@model.update_attributes({:wrong => "anything"})
|
161
|
+
assert @model.attributes[:wrong] == nil
|
162
|
+
end
|
163
|
+
test "model_name.human uses I18n" do
|
164
|
+
begin
|
165
|
+
custom_translations = {
|
166
|
+
:activemodel => {
|
167
|
+
:models => {
|
168
|
+
:address => "Translated address"
|
169
|
+
},
|
170
|
+
:errors => {
|
171
|
+
:messages => {
|
172
|
+
:blank => "Translated error"
|
173
|
+
}
|
174
|
+
}
|
175
|
+
}
|
176
|
+
}
|
177
|
+
I18n.backend.store_translations :en, custom_translations
|
178
|
+
assert_equal "Translated address", @model.class.model_name.human
|
179
|
+
@model.street = nil
|
180
|
+
@model.valid?
|
181
|
+
assert_equal "Translated error", @model.errors[:street].first
|
182
|
+
ensure
|
183
|
+
I18n.reload!
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
end
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# Configure Rails Envinronment
|
2
|
+
ENV["RAILS_ENV"] = "test"
|
3
|
+
|
4
|
+
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
5
|
+
require "rails/test_help"
|
6
|
+
|
7
|
+
ActionMailer::Base.delivery_method = :test
|
8
|
+
ActionMailer::Base.perform_deliveries = true
|
9
|
+
ActionMailer::Base.default_url_options[:host] = "test.com"
|
10
|
+
|
11
|
+
Rails.backtrace_cleaner.remove_silencers!
|
12
|
+
|
13
|
+
# Configure capybara for integration testing
|
14
|
+
require "capybara/rails"
|
15
|
+
Capybara.default_driver = :rack_test
|
16
|
+
Capybara.default_selector = :css
|
17
|
+
|
18
|
+
# Run any available migration
|
19
|
+
#ActiveRecord::Migrator.migrate File.expand_path("../dummy/db/migrate/", __FILE__)
|
20
|
+
|
21
|
+
# Load support files
|
22
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
metadata
ADDED
@@ -0,0 +1,201 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: file_record
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.1.0
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- "Micha\xC5\x82 Taszycki"
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2011-07-01 00:00:00 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rails
|
17
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ~>
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 3.0.4
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: *id001
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: capybara
|
28
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: "0"
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: *id002
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: sqlite3-ruby
|
39
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: "0"
|
45
|
+
type: :development
|
46
|
+
prerelease: false
|
47
|
+
version_requirements: *id003
|
48
|
+
description: Simplistic implementation of persistent model library. Inspired by ActiveRecord. And fully compatible with ActiveModel.
|
49
|
+
email:
|
50
|
+
executables: []
|
51
|
+
|
52
|
+
extensions: []
|
53
|
+
|
54
|
+
extra_rdoc_files: []
|
55
|
+
|
56
|
+
files:
|
57
|
+
- .gitignore
|
58
|
+
- .rvmrc
|
59
|
+
- Gemfile
|
60
|
+
- Gemfile.lock
|
61
|
+
- MIT-LICENSE
|
62
|
+
- README.md
|
63
|
+
- Rakefile
|
64
|
+
- file_record.gemspec
|
65
|
+
- lib/file_record.rb
|
66
|
+
- lib/file_record/attribute_management.rb
|
67
|
+
- lib/file_record/attribute_methods.rb
|
68
|
+
- lib/file_record/attribute_methods/all.rb
|
69
|
+
- lib/file_record/attribute_methods/dirty.rb
|
70
|
+
- lib/file_record/attribute_methods/read.rb
|
71
|
+
- lib/file_record/attribute_methods/validation.rb
|
72
|
+
- lib/file_record/attribute_methods/write.rb
|
73
|
+
- lib/file_record/base.rb
|
74
|
+
- lib/file_record/callbacks.rb
|
75
|
+
- lib/file_record/compatibility.rb
|
76
|
+
- lib/file_record/persistence.rb
|
77
|
+
- lib/file_record/validations.rb
|
78
|
+
- test/dummy/Rakefile
|
79
|
+
- test/dummy/app/controllers/addresses_controller.rb
|
80
|
+
- test/dummy/app/controllers/application_controller.rb
|
81
|
+
- test/dummy/app/helpers/addresses_helper.rb
|
82
|
+
- test/dummy/app/helpers/application_helper.rb
|
83
|
+
- test/dummy/app/models/address.rb
|
84
|
+
- test/dummy/app/views/addresses/_form.html.erb
|
85
|
+
- test/dummy/app/views/addresses/edit.html.erb
|
86
|
+
- test/dummy/app/views/addresses/index.html.erb
|
87
|
+
- test/dummy/app/views/addresses/new.html.erb
|
88
|
+
- test/dummy/app/views/addresses/show.html.erb
|
89
|
+
- test/dummy/app/views/layouts/application.html.erb
|
90
|
+
- test/dummy/config.ru
|
91
|
+
- test/dummy/config/application.rb
|
92
|
+
- test/dummy/config/boot.rb
|
93
|
+
- test/dummy/config/database.yml
|
94
|
+
- test/dummy/config/environment.rb
|
95
|
+
- test/dummy/config/environments/development.rb
|
96
|
+
- test/dummy/config/environments/production.rb
|
97
|
+
- test/dummy/config/environments/test.rb
|
98
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
99
|
+
- test/dummy/config/initializers/inflections.rb
|
100
|
+
- test/dummy/config/initializers/mime_types.rb
|
101
|
+
- test/dummy/config/initializers/secret_token.rb
|
102
|
+
- test/dummy/config/initializers/session_store.rb
|
103
|
+
- test/dummy/config/locales/en.yml
|
104
|
+
- test/dummy/config/routes.rb
|
105
|
+
- test/dummy/public/404.html
|
106
|
+
- test/dummy/public/422.html
|
107
|
+
- test/dummy/public/500.html
|
108
|
+
- test/dummy/public/favicon.ico
|
109
|
+
- test/dummy/public/javascripts/application.js
|
110
|
+
- test/dummy/public/javascripts/controls.js
|
111
|
+
- test/dummy/public/javascripts/dragdrop.js
|
112
|
+
- test/dummy/public/javascripts/effects.js
|
113
|
+
- test/dummy/public/javascripts/prototype.js
|
114
|
+
- test/dummy/public/javascripts/rails.js
|
115
|
+
- test/dummy/public/stylesheets/.gitkeep
|
116
|
+
- test/dummy/public/stylesheets/scaffold.css
|
117
|
+
- test/dummy/script/rails
|
118
|
+
- test/dummy/tmp/file_records/.gitkeep
|
119
|
+
- test/file_record_test.rb
|
120
|
+
- test/integration/navigation_test.rb
|
121
|
+
- test/support/integration_case.rb
|
122
|
+
- test/test_helper.rb
|
123
|
+
homepage: https://github.com/mehowte/file_record
|
124
|
+
licenses: []
|
125
|
+
|
126
|
+
post_install_message:
|
127
|
+
rdoc_options: []
|
128
|
+
|
129
|
+
require_paths:
|
130
|
+
- lib
|
131
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
132
|
+
none: false
|
133
|
+
requirements:
|
134
|
+
- - ">="
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
hash: -3830880680304252502
|
137
|
+
segments:
|
138
|
+
- 0
|
139
|
+
version: "0"
|
140
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
141
|
+
none: false
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
hash: -3830880680304252502
|
146
|
+
segments:
|
147
|
+
- 0
|
148
|
+
version: "0"
|
149
|
+
requirements: []
|
150
|
+
|
151
|
+
rubyforge_project: file_record
|
152
|
+
rubygems_version: 1.8.5
|
153
|
+
signing_key:
|
154
|
+
specification_version: 3
|
155
|
+
summary: Simplistic implementation of persistent model library.
|
156
|
+
test_files:
|
157
|
+
- test/dummy/Rakefile
|
158
|
+
- test/dummy/app/controllers/addresses_controller.rb
|
159
|
+
- test/dummy/app/controllers/application_controller.rb
|
160
|
+
- test/dummy/app/helpers/addresses_helper.rb
|
161
|
+
- test/dummy/app/helpers/application_helper.rb
|
162
|
+
- test/dummy/app/models/address.rb
|
163
|
+
- test/dummy/app/views/addresses/_form.html.erb
|
164
|
+
- test/dummy/app/views/addresses/edit.html.erb
|
165
|
+
- test/dummy/app/views/addresses/index.html.erb
|
166
|
+
- test/dummy/app/views/addresses/new.html.erb
|
167
|
+
- test/dummy/app/views/addresses/show.html.erb
|
168
|
+
- test/dummy/app/views/layouts/application.html.erb
|
169
|
+
- test/dummy/config.ru
|
170
|
+
- test/dummy/config/application.rb
|
171
|
+
- test/dummy/config/boot.rb
|
172
|
+
- test/dummy/config/database.yml
|
173
|
+
- test/dummy/config/environment.rb
|
174
|
+
- test/dummy/config/environments/development.rb
|
175
|
+
- test/dummy/config/environments/production.rb
|
176
|
+
- test/dummy/config/environments/test.rb
|
177
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
178
|
+
- test/dummy/config/initializers/inflections.rb
|
179
|
+
- test/dummy/config/initializers/mime_types.rb
|
180
|
+
- test/dummy/config/initializers/secret_token.rb
|
181
|
+
- test/dummy/config/initializers/session_store.rb
|
182
|
+
- test/dummy/config/locales/en.yml
|
183
|
+
- test/dummy/config/routes.rb
|
184
|
+
- test/dummy/public/404.html
|
185
|
+
- test/dummy/public/422.html
|
186
|
+
- test/dummy/public/500.html
|
187
|
+
- test/dummy/public/favicon.ico
|
188
|
+
- test/dummy/public/javascripts/application.js
|
189
|
+
- test/dummy/public/javascripts/controls.js
|
190
|
+
- test/dummy/public/javascripts/dragdrop.js
|
191
|
+
- test/dummy/public/javascripts/effects.js
|
192
|
+
- test/dummy/public/javascripts/prototype.js
|
193
|
+
- test/dummy/public/javascripts/rails.js
|
194
|
+
- test/dummy/public/stylesheets/.gitkeep
|
195
|
+
- test/dummy/public/stylesheets/scaffold.css
|
196
|
+
- test/dummy/script/rails
|
197
|
+
- test/dummy/tmp/file_records/.gitkeep
|
198
|
+
- test/file_record_test.rb
|
199
|
+
- test/integration/navigation_test.rb
|
200
|
+
- test/support/integration_case.rb
|
201
|
+
- test/test_helper.rb
|