ilog 0.2.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 169f5101dcd45c871b166791a337eb74a2ae04e550fee6df10d3fa5be4259d0e
4
- data.tar.gz: 7fe4f560ac239ed5dc82abcc615f38de9a140ab9e64e5916c4e3053754eaf036
3
+ metadata.gz: f5b54420038336ddade9ba63545c8e1bd942350ba122a39e37789ddfa3f2885b
4
+ data.tar.gz: 4fd63ec5554d93020c3fcef18ebdbfb2575e69cebf7c11103788398561067167
5
5
  SHA512:
6
- metadata.gz: f5f9e58e150231b6d11032f812ef83df44b814ad7a796611834813ca124b8f8a2f09cc437fd4d7d9bd7039d43944ea6e98fe7d1d7cf4591f65c258258fcb34f9
7
- data.tar.gz: 57ef316bd4a4de697d424c474076ee97788c4334772f712a83981155a8cd801138a2fe4e7f780ffd1227d635c5709d3d33d9ede1b391ce7d72df9cbbd573725f
6
+ metadata.gz: 5da962c1c5cfd56521e91bc726e84acfbe330e5152fb75692baabe5fb6a0953f19c7fe433d836af1fd4840f0ae7cac64ac4e28ccdf061c06c87d5eaad357043d
7
+ data.tar.gz: 883fc29e8e89bf353c2f2734d6bbd928c7c8726ce1bfba92e46c96c1d413e0d293b412bb93febb0e21cb816f30fa5c3a25aa54dcd95b26eaeca952a75f167839
@@ -1,8 +1,9 @@
1
1
  module Ilog
2
2
  class Configuration
3
- attr_accessor :namespaces
3
+ attr_accessor :namespaces, :host
4
4
  def initialize
5
5
  @namespaces = {}
6
+ @host = 'localhost'
6
7
  end
7
8
  end
8
9
  end
@@ -3,7 +3,7 @@ module Ilog
3
3
  module Index
4
4
  class Digital
5
5
  include Ilog::Action
6
- expose :namespace
6
+ expose :namespace, :host
7
7
  def set_database database
8
8
  tmp_config = ActiveRecord::Base.connection_config
9
9
  tmp_config[:database] = database
@@ -13,6 +13,7 @@ module Ilog
13
13
  @database = Ilog.configuration.namespaces[params[:domain]]
14
14
  self.set_database @database
15
15
  @namespace = params[:domain]
16
+ @host = Ilog.configuration.host
16
17
  req = request.env['HTTP_ACCEPT']
17
18
  if req.include? 'application/json'
18
19
  post = ::Post.find(params[:id])
@@ -10,7 +10,7 @@
10
10
  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
11
11
  <script>
12
12
  Window.Config = {
13
- "host": "http://localhost:2300",
13
+ "host": "<%= host %>",
14
14
  "title": "My Blog",
15
15
  "profile": { "avatar": "", "author": "", "status": "", "website": "", "email": "", "location": "" },
16
16
  "digital": { "uri": "<%= namespace %>" },
data/lib/ilog/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ilog
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -4,6 +4,9 @@ module Ilog
4
4
  class Digital
5
5
  include Ilog::View
6
6
  layout false
7
+ def host
8
+ raw locals[:host]
9
+ end
7
10
  end
8
11
  end
9
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ilog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - captainhusaynpinguin