nimbu 0.7.5 → 0.7.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 37e039c97436b915b3f70fe8cf2b0db35c1d137c
4
- data.tar.gz: 60ff97f52d16873ad9b19d96db96e8b86ec328e9
3
+ metadata.gz: 21b7d8892790d10f8151ea6247fc91a9857b74b5
4
+ data.tar.gz: 0983c78069f633edad523a1cdb0ed0c624606c80
5
5
  SHA512:
6
- metadata.gz: b353567ed89ccd5cca96edb8b400d392a73c40c57d26b34554ca6171df0623c4d8d4154d3e0a0f730561f3f3c1ba1c88c2d29c0ba90361b455319a2de84efd68
7
- data.tar.gz: 6bcb5fbd09798ec8f81011c267a66a4afa9c3f98d1699b27d1fbf33f35ec18361e4aadee8a967811b4a03e43ac899e15c1efb44e6b4da2e2e01c501a0c98ac27
6
+ metadata.gz: a7e1219e3af4ec5922c0b363a73ee845868e1ff9034c5635226d9de7113b5c39e654f9ef9081443f56b4c62e83a12d03173c4e31c30b37a9c990a97409a6fde7
7
+ data.tar.gz: 0ac51a4a9150b6e303c016103601318890ad8d30cfe76046744d96f6dc9898cb3b8aa4a395beb16a4893993a76b797dd90d81122b10a598264a43ffa3dff97ef
data/lib/nimbu.rb CHANGED
@@ -10,4 +10,8 @@ module Nimbu
10
10
  def self.debug
11
11
  @debug || false
12
12
  end
13
+
14
+ def self.cli_options
15
+ @cli_options ||= {}
16
+ end
13
17
  end
@@ -12,10 +12,11 @@ class Nimbu::Command::Server < Nimbu::Command::Base
12
12
  #
13
13
  # starts a local development server, using the data from the Nimbu cloud in real time.
14
14
  #
15
- # -p PORT, --port PORT # set the port on which to start the http server
15
+ # -p PORT, --port PORT # set the port on which to start the http server
16
16
  # -h, --haml # start local HAML watcher
17
17
  # -c, --compass # start local Compass watcher
18
18
  # -d, --debug # enable debugging output
19
+ # --nocookies # disable session refresh cookie check
19
20
  #
20
21
  def index
21
22
  # Check if config file is present?
@@ -23,8 +24,13 @@ class Nimbu::Command::Server < Nimbu::Command::Base
23
24
  print red(bold("ERROR")), ": this directory does not seem to contain any Nimbu theme or your credentials are not set. \n ==> Run \"", bold { "nimbu init"}, "\" to initialize this directory."
24
25
  else
25
26
  no_compilation = true #! options[:'no-compile']
26
- with_haml = options[:haml]
27
- with_compass = options[:compass]
27
+ with_haml = options[:haml]
28
+ with_compass = options[:compass] || options[:c]
29
+ no_cookies = options[:nocookies]
30
+
31
+ if no_cookies
32
+ Nimbu.cli_options[:nocookies] = true
33
+ end
28
34
 
29
35
  if with_compass
30
36
  require 'compass'
@@ -39,8 +45,9 @@ class Nimbu::Command::Server < Nimbu::Command::Base
39
45
  services << "HAML" if with_haml
40
46
  services << "Compass" if with_compass
41
47
  title = "Starting up Nimbu Server"
42
- title << "(with local #{services.join(' and ')} watcher)" if with_compass || with_haml
43
- title << "..."
48
+ title << " (with local #{services.join(' and ')} watcher)" if with_compass || with_haml
49
+ title << " (skipping cookies check)" if no_cookies
50
+ title << " ..."
44
51
  puts white("\n#{title}")
45
52
  puts green(nimbu_header)
46
53
  puts green("\nConnnected to '#{Nimbu::Auth.site}.#{Nimbu::Auth.admin_host}', using '#{Nimbu::Auth.theme}' theme#{Nimbu.debug ? ' (in debug mode)'.red : nil}.\n")
@@ -47,7 +47,7 @@ module Nimbu
47
47
  method = detect_http_method(request)
48
48
  @templates = {}
49
49
 
50
- if cookies["nimbu_simulator_id"] != Nimbu::Auth.simulator_id
50
+ if !Nimbu.cli_options[:nocookies] && cookies["nimbu_simulator_id"] != Nimbu::Auth.simulator_id
51
51
  puts yellow("Refreshing session for simulation...")
52
52
  cookies.each {|k,v| cookies.delete(k)}
53
53
  response.set_cookie "nimbu_simulator_id", { :value => Nimbu::Auth.simulator_id, :http_only => false, :path => "/" }
data/lib/nimbu/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Nimbu
3
- VERSION = "0.7.5"
3
+ VERSION = "0.7.6"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nimbu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.5
4
+ version: 0.7.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zenjoy BVBA
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-25 00:00:00.000000000 Z
11
+ date: 2015-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: term-ansicolor
@@ -311,7 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
311
311
  version: '0'
312
312
  requirements: []
313
313
  rubyforge_project:
314
- rubygems_version: 2.4.5
314
+ rubygems_version: 2.2.2
315
315
  signing_key:
316
316
  specification_version: 4
317
317
  summary: Client library and CLI to design websites on the Nimbu platform.