front_end_builds 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/front_end_builds/app.rb +4 -0
- data/app/models/front_end_builds/build.rb +13 -8
- data/lib/front_end_builds/version.rb +1 -1
- 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: 2a4d2e6eac89811c5e5781df016a660143303506
|
4
|
+
data.tar.gz: b69d465aa8f33ca73d5b5fc217b380536adcd300
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d7c27fa0ac6631d240589b8aa4acf42f9b046150865fd9b0ab498b1fecd025f69cc8a04683de26215aa6443bc767cbca59b3000a9408a1ce8dcf3bbefb0a19a
|
7
|
+
data.tar.gz: c1f30ca9fcbec3f8b04f80795a3a7623f938ec56d6d3e4b779633161a5b930c08d5b7b89a4799d3962732d718d277bb66b3b2ccf7ccafec0014d87686e987631
|
@@ -1,8 +1,13 @@
|
|
1
|
-
require '
|
2
|
-
require 'uri'
|
1
|
+
require 'open-uri'
|
3
2
|
|
4
3
|
module FrontEndBuilds
|
5
4
|
class Build < ActiveRecord::Base
|
5
|
+
if defined?(ProtectedAttributes) || ::ActiveRecord::VERSION::MAJOR < 4
|
6
|
+
attr_accessible :branch,
|
7
|
+
:sha,
|
8
|
+
:endpoint
|
9
|
+
end
|
10
|
+
|
6
11
|
belongs_to :app, class_name: "FrontEndBuilds::App"
|
7
12
|
|
8
13
|
validates :app, presence: true
|
@@ -58,16 +63,16 @@ module FrontEndBuilds
|
|
58
63
|
def fetch!
|
59
64
|
return if fetched?
|
60
65
|
|
61
|
-
html =
|
66
|
+
html = URI.parse(endpoint).read
|
62
67
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
)
|
68
|
+
self.html = html
|
69
|
+
self.fetched = true
|
70
|
+
save
|
67
71
|
end
|
68
72
|
|
69
73
|
def activate!
|
70
|
-
|
74
|
+
self.active = true
|
75
|
+
save
|
71
76
|
end
|
72
77
|
|
73
78
|
def with_head_tag(tag)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: front_end_builds
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Toronto
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-01-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sqlite3
|