feature_proof 1.1.11 → 1.1.20
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 +4 -4
- data/README.md +2 -0
- data/app/assets/stylesheets/feature_proof.scss +16 -8
- data/app/views/feature_proof/_proof.html.erb +16 -7
- data/lib/feature_proof/version.rb +1 -1
- data/lib/feature_proof.rb +1 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2375d1fa6f10afd3cb2f38605e3e2865c27978e
|
4
|
+
data.tar.gz: 892feedb2036aacdc6753c427951f53443bcc132
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1442deecac3b74ef13965fd443f7f087c7551f42e1bc41ccbf98ebbbf2b8f45213bd1a8c66a84c848cf48c847d23973f209f5036ec9c4176dee0b112fe4ba635
|
7
|
+
data.tar.gz: 78ce60c57a3a5d7a068a736162b1772d2302435f0d57365e338918d641c2bdc968a962c52a6b0ad0f2c2a081ca893462a8787cb05905ed178dc3437097eb397f
|
data/README.md
CHANGED
@@ -31,6 +31,8 @@ You have to fill up following commands:
|
|
31
31
|
$ FeatureProof.configure do |config|
|
32
32
|
config.model = "" #<- here goes the name of Model to extract data from
|
33
33
|
config.field = "" # <- here goes the field that you want to search in given model
|
34
|
+
config.location_city = "" # <- if you want to display the location city fill that field, if not leave it as it is
|
35
|
+
config.location_country = "" # <- if you want to display the location country fill that field, if not leave it as it is
|
34
36
|
config.text_to_display = "" #<- here goes text to display after the field of the model
|
35
37
|
end
|
36
38
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.feature-proof-wrapper {
|
2
|
-
background-color:
|
2
|
+
background-color: white;
|
3
3
|
font-size: 14px;
|
4
|
-
color: #
|
4
|
+
color: #302d2e;
|
5
5
|
text-align: center;
|
6
6
|
position: fixed;
|
7
7
|
z-index: 99999;
|
@@ -9,28 +9,36 @@
|
|
9
9
|
left: 10px;
|
10
10
|
height: 75px;
|
11
11
|
width: 300px;
|
12
|
-
border:
|
13
|
-
display:
|
12
|
+
border: 1px solid #6b6b6b;
|
13
|
+
display: none;
|
14
14
|
opacity: 0;
|
15
15
|
border-radius: 40px;
|
16
16
|
|
17
|
+
.feature_proof_content {
|
18
|
+
height: 100%;
|
19
|
+
width: 100%;
|
20
|
+
}
|
21
|
+
|
17
22
|
.branch-name {
|
18
|
-
color: #
|
23
|
+
color: #000000;
|
24
|
+
margin: 0 auto;
|
25
|
+
padding-top: 10px;
|
19
26
|
font-weight: bolder;
|
20
27
|
text-decoration: solid;
|
21
|
-
font-size:
|
28
|
+
font-size: 14px;
|
22
29
|
display: inline-block;
|
23
30
|
}
|
24
31
|
|
25
32
|
.feature-proof-logo {
|
26
|
-
margin: 10px;
|
33
|
+
margin: 10px 15px 10px 15px;
|
27
34
|
height: 50px;
|
28
35
|
float: left;
|
29
36
|
position: relative;
|
30
37
|
left: 15px;
|
31
38
|
}
|
32
39
|
p {
|
33
|
-
padding-top:
|
40
|
+
//padding-top: 3px;
|
41
|
+
margin: 0 auto;
|
34
42
|
}
|
35
43
|
}
|
36
44
|
|
@@ -1,12 +1,21 @@
|
|
1
1
|
<div class="container text-center">
|
2
2
|
<% tmp = FeatureProof::Proof.new FeatureProof.configuration.model, FeatureProof.configuration.field, FeatureProof.configuration.text_to_display %>
|
3
3
|
<% tmp.f_records.each do |record| %>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
<div class="feature-proof-wrapper item text-center">
|
5
|
+
<%= image_tag record.image, class: "feature-proof-logo img-responsive img-thumbnail" %>
|
6
|
+
|
7
|
+
<%- location = Geokit::Geocoders::RipeGeocoder.geocode(record.read_attribute("last_sign_in_ip").to_s)
|
8
|
+
city = location.city
|
9
|
+
country = location.country_code
|
10
|
+
full_name = record.read_attribute(tmp.f_field.downcase).to_s
|
11
|
+
name = full_name.split(' ')
|
12
|
+
%>
|
13
|
+
<div class="feature-proof-content">
|
14
|
+
<span class="branch-name"> <%= name[0] %> <%- unless city.to_s.empty? and (city.to_s + country.to_s).length < 25 %> from <%= city %><% end %><%- unless country.to_s.empty? and (city.to_s + country.to_s).length < 25 %>, <%= country %><% end %></span>
|
15
|
+
<p>
|
16
|
+
<%= tmp.f_text_to_display%>
|
17
|
+
</p>
|
18
|
+
</div>
|
19
|
+
</div>
|
11
20
|
<% end %>
|
12
21
|
</div>
|
data/lib/feature_proof.rb
CHANGED
@@ -22,8 +22,7 @@ module FeatureProof
|
|
22
22
|
end
|
23
23
|
|
24
24
|
class Proof < Configuration
|
25
|
-
attr_accessor :f_model, :f_field, :f_text_to_display
|
26
|
-
attr_accessor :f_records
|
25
|
+
attr_accessor :f_model, :f_field, :f_text_to_display, :f_records
|
27
26
|
|
28
27
|
def initialize(t_model, t_field, t_text)
|
29
28
|
@f_model = t_model
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: feature_proof
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maksymilian Orzechowski
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|