limesurvey_rails 1.1.0 → 1.1.1
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.
- checksums.yaml +8 -8
- data/README.md +10 -2
- data/lib/limesurvey_rails/participant.rb +3 -0
- data/lib/limesurvey_rails/version.rb +1 -1
- data/spec/models/limesurvey_rails/survey_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
M2QwZWVmM2Y4YTRkMTExNTA3NGFiYmI3ZGE0YzY0OTFiYTdjMWM2ZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTIyNTA1MDdjOTA3YzQ3ZjFkMTg4ZTZiZmI4YTA4NDhjMDUxMWZmNg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzFhMTkyZWY5YTY5Y2Q5NzQ4Mzc2ODJhMmM0Yjk0ZjdlY2YyMDcxYWY4OWMw
|
10
|
+
M2JkZDUxZmVlMGQxZDhlZDdiZTVkMzJiZTZjYTY3YWUzYWQ0MjU5ZTIyYjEz
|
11
|
+
NGNlZmU3NTVhODY5YmZmYWU5NWJhMWNjMzIyNzQzNDM3ZTdjMzE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OGI1ZmFkZDU1MDA5NDlkMTM4YWZiODFmZDg3NjlhYzJlMTJmZjlkZjIwM2Y2
|
14
|
+
ZDI5ZTRmMDM4M2I5MDgxODJhZWNmYzI0YjI3YjBjY2FmNmZmNTkzMzUxOTVm
|
15
|
+
Yzc3YTFjMjAzZTg1YzA0N2MzMTY1YjVkNGU5N2FiMzk1NTA5ZWE=
|
data/README.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# LimesurveyRails
|
2
2
|
|
3
|
-
|
3
|
+
A limesurvey plugin for Rails to make an ActiveRecord model able to participate to Limesurvey surveys
|
4
|
+
|
5
|
+
## Premise
|
6
|
+
|
7
|
+
This is a very very poor readme. I use this gem in my projects but I can't describe it better because I'm busy. But if anyone is interested just contact me
|
4
8
|
|
5
9
|
## Installation
|
6
10
|
|
@@ -18,7 +22,11 @@ Or install it yourself as:
|
|
18
22
|
|
19
23
|
## Usage
|
20
24
|
|
21
|
-
|
25
|
+
In your participant model simply add
|
26
|
+
|
27
|
+
is_a_limesurvey_participant
|
28
|
+
|
29
|
+
but there are many options ..
|
22
30
|
|
23
31
|
## Contributing
|
24
32
|
|
@@ -28,6 +28,9 @@ module LimesurveyRails
|
|
28
28
|
LimesurveyRails::SurveyParticipation.class_exec(self){ |klass| belongs_to :participant, :class_name => klass, :foreign_key => 'participant_id'}
|
29
29
|
# LimesurveyRails::SurveyParticipation.belongs_to :participant, :class_name => self.name, :foreign_key => 'participant_id'
|
30
30
|
|
31
|
+
# to make sure LimesurveyRails::SurveyParticipation model is connected to the same database of the is_a_limesurvey_participant class (in case of multi database apps)
|
32
|
+
LimesurveyRails::SurveyParticipation.establish_connection(connection_config) unless Rails.env.test? #... but during test it creates problems because SQLite only allow one connection
|
33
|
+
|
31
34
|
# below the proof that among tests associated classes not get updated even after remove_const calls
|
32
35
|
# see also http://code.activestate.com/lists/ruby-talk/42730/
|
33
36
|
# puts (LimesurveyRails::SurveyParticipation.reflect_on_association(:participant).klass.object_id == self.object_id)
|
@@ -90,7 +90,7 @@ module LimesurveyRails
|
|
90
90
|
FactoryGirl.create_list(:test_model,3)
|
91
91
|
TestModel.all.each{ |tm| FactoryGirl.create(:limesurvey_rails_survey_participation, :survey_id => test_survey.id, :participant_id => tm.id ) }
|
92
92
|
end
|
93
|
-
it "its survey participations are deleted" do
|
93
|
+
it "its survey participations are deleted", :wip do
|
94
94
|
test_survey.destroy
|
95
95
|
expect(SurveyParticipation.for_survey(test_survey.id)).to be_empty
|
96
96
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: limesurvey_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- masciugo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|