ns_settings_ui 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/app/helpers/ns_settings_ui/settings_helper.rb +16 -0
  3. data/app/models/ns_settings_ui/setting.rb +58 -8
  4. data/app/views/ns_settings_ui/settings/_edit.html.erb +2 -2
  5. data/lib/ns_settings_ui/version.rb +1 -1
  6. data/spec/dummy/db/development.sqlite3 +0 -0
  7. data/spec/dummy/db/test.sqlite3 +0 -0
  8. data/spec/dummy/log/development.log +15519 -87712
  9. data/spec/dummy/log/test.log +24 -0
  10. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-h/-huUZEeWsF1Y2GoLl7VPI262u6aQ2zRy7csSUW4EGnM.cache +1 -0
  11. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/3O/3OYCHhSogcnpPO8TEU0IMXa7dt93tjoV_oCcCouefgk.cache +1 -0
  12. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/{pM/pMAWnfeeeCzm8dlVCdOHIbhjUtmpJOVmvpIR01zfw7I.cache → 4y/4y88Hco-j0gb_bUcD33Vy_ETqLQZcw3SldmBnjxzb-k.cache} +0 -0
  13. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/{Zt/ZtMkfyfrpm9qwpYx_4WLbUavfFQfotBfakrEWO2657o.cache → 6e/6eaQ1xmlgyG2oVlvnUdXFLKig1kYY9gJIT7w5OnMvOM.cache} +0 -0
  14. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/{V_/V_SH9w1FYS9Dk0I47az4RNyDVjuVZf1NZjKUBTx7DKE.cache → 7D/7DN0SNCFuuj5pjdweaSZbZtIJi-yvD8lNG-5ufopP-0.cache} +0 -0
  15. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/{66/66IMTAtFvaISY2aArUKcYSBALYsZa508NwlGHpcnJ2Y.cache → 7E/7E8wzRY74VYhkWwZku4gLXFnve2mO52AGE1u7vAY5tA.cache} +0 -0
  16. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7Z/7Z6lWMsjMcroLzoX5XW3SSjSBjcRdF0R57IgdpPdsgk.cache +1 -0
  17. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9q/9qhHvz5DDDkWvrXdAhPdHHJ_4gTeVSrRtvj7E7OeZB8.cache +0 -0
  18. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9s/9syJMx2iCHRP_PY1pFB5n3xG7WP9cxZprcJbss1ICm8.cache +1 -0
  19. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/AQ/AQiAOCtziPqB7mPelfPZWFysKMS_8DdW9d9GAvg7nDo.cache +3 -0
  20. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Db/DbmLC3wtG7ztEvkzmVAubW8vf37XdD0bT3Kh73oed1A.cache +1 -1
  21. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Do/DopyKfloh2QmFXAbplf-Q75zVrdUHoaer7Bv06rQZX8.cache +1 -0
  22. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Dr/DrsRzr20ToTrVLYf9S2Iyl5__kMCD31Ufi7hjBqBDzM.cache +0 -0
  23. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/EL/ELacTpJi76Y38Tpfrp4vMyzBCGYaRBD9DFtuomHbqhk.cache +0 -0
  24. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/{bx/bxrmzZMCa6H7tW_I9GevT5rQ4WdmPZN7VwgR8yuVkiU.cache → Eq/EqrkFWl4FDY_ODV3qq3Cbwq8AiLASXEohfmzPPhRSdU.cache} +0 -0
  25. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/GZ/GZkpHgNs8yy14wzmIHHp7ab11B8b3gAEZ0PnuCTFMZw.cache +1 -0
  26. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Hl/HlVZgN65pvvw0SlUOG6Ec37E4PFLQ-HoHWYOcl2xoHo.cache +3 -0
  27. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/{6-/6-ClR3PgOb6GBybMdmH3CDGt3cBerX0FVYL6-qqNasM.cache → KO/KOyT6IOJ4iHXQ79M7Fr4IxVGHuYVE5G8fHCfvelFpDs.cache} +0 -0
  28. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ne/NeKqTXEb-H1Hz6gDq6NcGirFDj9Pk7LGhOAzKRVWJR4.cache +1 -0
  29. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/{5h/5hshogdtG_xqu53KWr8VuK8t0y_ATOm5nYbxRalQL3E.cache → OE/OEIhEr3z8UoH2EsCmx5UGx7soZ1Ig8qSs1gHnOtFvQE.cache} +0 -0
  30. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Q-/Q-I1m-kbKv1L96nWQk4A5Z7hIHWvnZMW3-M6wxbeZmQ.cache +0 -0
  31. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Qj/QjdmUkKv3N2KKb2sE7HfJHfCkTRTsyiKWcaQE0dLmyI.cache +1 -0
  32. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Tg/TgTcVvqf5KTGti25aDSVdPzdEFSzFCA7TIgv36nVcSw.cache +1 -1
  33. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/{yM/yMWpYftJ6pj2YLfOnkGZPmh0MIJC5ADlXuhKIs7q150.cache → Wp/WpF0Ar6BqxCRChbnD7ADsnnIhuCyAYEhSS3wrnv8PZE.cache} +0 -0
  34. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/{JA/JAogC-UUMjEcwkx52-5KPnEkwOKLDyhSaDmpdGs5VrA.cache → al/alf1Lxf86R0vjIdVj6cZepiLsNlRG8Ks3N2ZaRnVhFI.cache} +0 -0
  35. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/cQ/cQCpVHz-I595ffaQdVyapH7sAo2uGhu4gddOeI8fXwE.cache +2 -0
  36. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/eN/eNqm8oKaAS_dbccyL9N1GwByJNxUWI-B_ePWmy_iTC0.cache +1 -0
  37. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/{Pv/PvQkjcglr7ZLyuBIFOUrh7dHgNpeViNZWL23FVQla30.cache → fi/fiUvXX8DObrJlwuE5zIPsctigzDJZi_91AyzXc1hjCU.cache} +0 -0
  38. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/gQ/gQ610EkvmTMaVuLAgUGJk4eK9m9tERZUILLW3Fbmg5s.cache +0 -0
  39. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/hn/hnYRMoTDOi8vmbFOEh7ieo2dQiukt77l3jLxZWOd0qc.cache +2 -0
  40. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/{MU/MUqHQfvjj5BLT0A6jU2kpiIk8FkH0EqnBJ4EXbyIK04.cache → iV/iVOjizkUshjWMEQsVsZKHHsQtsN3TpmEJcqdv2eyuXU.cache} +0 -0
  41. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/{bF/bFgiSDRTiUvuc3LjoAYkvQEd_wGXIU8pIHM35pqVm1I.cache → kN/kNttJNDzp2Boo1hHrtqY8gQzDPzjtZkIOgZnbvWYFe0.cache} +0 -0
  42. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/n2/n2Kio2la0DGZfPZc8LIV3swEvv_0BO9m3iGgBBhBRsw.cache +1 -0
  43. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nk/nk0gugIxBh-1LQv1BmR7uY6F8qVYFuUIFeZ7ISpn_sc.cache +0 -0
  44. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/{2A/2AuVCEUkqURI89dt0__pL_-mTzxouKnE_3oX5pHynKM.cache → pw/pw-XzhXWwjJm1inQWgGwg_GAupW3Z1WuHOcbUIhX1z0.cache} +0 -0
  45. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/q6/q6BYa32YJF11eGVapO4ouNl6gayPIsARgMavlzZmoi0.cache +1 -1
  46. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qp/qpvU0DP1OGt-mJF0d0eikYkkhkdRPwb3MJsp2bmk0tw.cache +2 -0
  47. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/{1n/1n-QlIPebozz18AW27-wC9aJCZ5Ua_C3V5X2y9wrsX4.cache → rW/rWgaUUE_x6YhQkm9XUyaZVg4CAaz9d6iRBMc-Uw21WM.cache} +0 -0
  48. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ru/ru8QRjiZ5xAMQfZZHu_fOew2fg6_ZxPyTxPArLLOx70.cache +2 -0
  49. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sk/sk0hg41M7iP_3iMQtCbooF5Jvju9Pw8zw7YeCrfrB6E.cache +0 -0
  50. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/{18/18jjehmj_LEVg35UjaZLf0c_8OFrnSHl_s0qGB9BOzE.cache → sr/srzIrkat4qkUSsKuYzLzvf2IhMDpVt1sD6HKLfqkehs.cache} +0 -0
  51. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/t8/t8Tx-sJKyrQ0l0aBIvf2Y-tV66cthiBS9qK-Gew62g8.cache +2 -0
  52. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/te/teyuM1EAaRCeXQTB7jiESwi6LSw6QPMvEHp-XYRwVvU.cache +2 -0
  53. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/{Zq/ZqJ3NOYi5cdFvRBHXLAMPmVxzBi6tVyAqUbswIRMBmQ.cache → uL/uLgJhsyU4HD4eXpDH5EYQ9VQYsukqsW_kNv4CsFYqwQ.cache} +0 -0
  54. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uy/uy-hsk58Ix6CUgI_TU_Tz8qZJUFjS7YXmCDqcvllASU.cache +1 -0
  55. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/{_2/_2otSeXazBlDDqyWBE9RNhILhE5inYBUTijaedTum6A.cache → vO/vO__Xc42mWGQwobS_nnK-EejIwQtU53w4u024hmkPS8.cache} +0 -0
  56. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/x7/x7KkTV3ibfIEysLB_ug5bfmnn2VLV_BldukPR3EoPBk.cache +1 -1
  57. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xr/xrAO6ua989MS_-82pmRISzmSJ_unbIQtuUlclLAF9tE.cache +1 -0
  58. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/zO/zOl6ReMn6jGgcBxWvF2FCzGWjOP11xy_uaiooTwnfQU.cache +2 -0
  59. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/zv/zvdAR94V-vLj1PMhn157FjLzagrfv_vss0DxZexqnLY.cache +1 -0
  60. data/spec/models/ns_settings_ui/setting_spec.rb +107 -19
  61. metadata +122 -158
  62. data/spec/dummy/tmp/cache/assets/C78/6C0/sprockets%2F5de19048739df46a34203b61520930ec +0 -0
  63. data/spec/dummy/tmp/cache/assets/C7B/1E0/sprockets%2Fa9d43ec510343970736b1e2b58583f12 +0 -0
  64. data/spec/dummy/tmp/cache/assets/C80/9B0/sprockets%2F02417790a872c443bb53c704de6d9817 +0 -0
  65. data/spec/dummy/tmp/cache/assets/D06/B10/sprockets%2F372b42d142d2148d2ac2e59f14e56b6f +0 -0
  66. data/spec/dummy/tmp/cache/assets/D35/050/sprockets%2Fc2125dacd7b550fce2e54d514136f872 +0 -0
  67. data/spec/dummy/tmp/cache/assets/D3D/300/sprockets%2Fbbe4e11574fda9e128081b0265cfd758 +0 -0
  68. data/spec/dummy/tmp/cache/assets/D4F/DC0/sprockets%2Fc357d3d555d38c53f8b96c3a8b91cb86 +0 -0
  69. data/spec/dummy/tmp/cache/assets/D71/4E0/sprockets%2F3bfa8a8e669189e3d4154eefa0cf1070 +0 -0
  70. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-J/-J3gsIpPAHQT_B27lQLnp7CXO16hrLZCdCSbG4WuP3A.cache +0 -1
  71. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/05/05FrW4XpbjdyW7ogDXsYPqFDO3A87CBWQstNe3DZ87A.cache +0 -2
  72. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/1P/1PWb4WMXakQ5IP3MTgk_o6-fI785NEDcJB2CPfcEHW0.cache +0 -0
  73. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/2P/2P8jkNKzvqRhyW6gO5ULdbxCd4-G9X6OLgbX8KYrGDY.cache +0 -1
  74. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/3-/3-fkwJ2IK-Ne3obnak0JqJN1Lov_rLg6BX2ttFLT86E.cache +0 -0
  75. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5t/5tE-fOOgDVkbBfJm8SkU1nSjFb3J4hw-OmRNm3FiNGw.cache +0 -1
  76. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/AV/AVEAO-o9UtvJmoTUXJ9S-PYUFlFpMU60MtzmYrH5DKU.cache +0 -0
  77. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/E_/E_FRQ_pWFSXXmjl4AQOE6-J8pr9ZMY0GmWoOgsX_iZk.cache +0 -2
  78. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Fm/FmPA5Rp7xtZUNggNQDiPInqCREUxfA_O5LloCjZJsR8.cache +0 -0
  79. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Gg/GgyimpP6ro_85uvAT83E1u9M-kabjyrWlWkji9vVAwQ.cache +0 -1
  80. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/It/ItnesFcCy4vwlO44OO1FBKLnqPl3EBSZiKdtldWrpMY.cache +0 -1
  81. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Jx/JxQa1X47JTgQjmQgGGktog5MMcpPvHXTXkm3jwI4qso.cache +0 -0
  82. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Kw/KwWaC3xOqGInPkzZvScIZvqJ3TMGIS9UQg-Qp4K-hRE.cache +0 -2
  83. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/L0/L0ORVVrwT9e8lnV6cNlW2iSRaUNJ8bD5jUF_QxPAFok.cache +0 -1
  84. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/MY/MYK2HZM9cBrP0W8yO0XctOsUBwAYZsiRDtjBysWrPJI.cache +0 -1
  85. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/R1/R1u30BA-totiUjc8_Xarqu-soqknc3bkJQHWZeFmgmw.cache +0 -2
  86. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/R3/R3TiDQh6oqYkJg0OPukvuPtLq4coTfxuEoWmZToq0hQ.cache +0 -3
  87. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/SI/SImwoOdwfjVbSIh5es1DCqmCmBu8nSF-YD9tD_nDW3k.cache +0 -1
  88. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Sz/SzKoQ8LgD73mi7vIRNTfY3irZeKdo_1LG1CBcHAQa8k.cache +0 -1
  89. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/V9/V90panAmSm2agBwp9J-1PjcFi7mTT5Cghbe7wnSR-iY.cache +0 -1
  90. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/V9/V9slK7F0D--OKKokpWfwJUAZw7f52nnfOg0cMV_hwGk.cache +0 -1
  91. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/WT/WTPpZew93ClEY_W-BrZ3GP3L5Bm68bDmqjNlfsLq-2o.cache +0 -1
  92. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Yp/Ype1uPGBytD6Usuot46gyU38x6O8h4G8AHOM62d_SfI.cache +0 -0
  93. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/bx/bxFQweQ7TMRCzOfItARcRfIr0IGtWQ7ztcLP4aUpid8.cache +0 -1
  94. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/cP/cPXYN8EErRQMS_lq5P2u62DIbkCyNamtKyn8-U0w1YM.cache +0 -0
  95. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dp/dpoHMsf77LE7HhEArU4TroyGiUN77Tpu2PGqdZTxSIE.cache +0 -1
  96. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/eF/eFgalkU7HIoDx0y9pHo_iKuDXTgDTQTZV1sEbxyQ0g8.cache +0 -0
  97. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/go/gohXbfaP8G4DfBIrDS9fVEDzjqdXKvajxFuhLRR5sUc.cache +0 -0
  98. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/h6/h68ZnnTjy-IbwXXWhLkAWZYTb_TGWxXf7U3pV6lu2SQ.cache +0 -3
  99. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/io/io66dkgGX7u0GfGqyiGMV17NoalcY-1bFTlDhblVCLs.cache +0 -2
  100. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/jM/jM28TsnOgDifkeE6m8VtuAqSv3i2Ry3lLw8OAZLVrZA.cache +0 -1
  101. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/kn/kn2haBwBXKZdd2NgyGaXXP8O6--21bJtaAB5Kapf6MQ.cache +0 -2
  102. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nC/nCf7WzpsKIJpNCviB0JraqJ-YpThZw3wjxrXp-AxH1I.cache +0 -2
  103. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/pO/pOP55ndP168amZ4zCEzpb3ywkvDqngogS72lsku_hGI.cache +0 -0
  104. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sz/szKqx7oRsb345g4AoPIah09KQmg7rNJrcn6SGd6KQRw.cache +0 -1
  105. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/vw/vwiNPTEWL6_yq9SluFfj119gdQgzpDbr1pPucgBneBg.cache +0 -2
  106. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yT/yTLcg8Qnq0KIWuMqbEEJDE3upO7JmeCBScTLP180tis.cache +0 -1
  107. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yV/yVEUe1EjE1P-4SKGg31dww1VJNJdY36aT0ioGY2-Kxs.cache +0 -3
  108. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ye/yeOeMsoB9-2IEyrLgohQ4dAUMrsu2FQsAFzD4olBqNY.cache +0 -1
@@ -0,0 +1,24 @@
1
+  (1.7ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2
+  (0.1ms) select sqlite_version(*)
3
+  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
+ Migrating to CreateNsSettingsUiSettings (20151210214903)
6
+  (0.1ms) begin transaction
7
+  (0.5ms) CREATE TABLE "ns_settings_ui_settings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "key" varchar NOT NULL, "value" varchar, "default_value" varchar, "created_at" datetime, "updated_at" datetime)
8
+  (0.1ms) CREATE INDEX "index_ns_settings_ui_settings_on_key" ON "ns_settings_ui_settings" ("key")
9
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20151210214903"]]
10
+  (0.6ms) commit transaction
11
+ Migrating to AddValueTypeToNsSettingsUiSettings (20151215081718)
12
+  (0.1ms) begin transaction
13
+  (0.5ms) ALTER TABLE "ns_settings_ui_settings" ADD "value_type" integer DEFAULT 0
14
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20151215081718"]]
15
+  (0.5ms) commit transaction
16
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
17
+  (0.1ms)  SELECT sql
18
+ FROM sqlite_master
19
+ WHERE name='index_ns_settings_ui_settings_on_key' AND type='index'
20
+ UNION ALL
21
+ SELECT sql
22
+ FROM sqlite_temp_master
23
+ WHERE name='index_ns_settings_ui_settings_on_key' AND type='index'
24
+ 
@@ -0,0 +1 @@
1
+ I"�/Users/marcin/Projects/U2i/ns_settings_ui/app/assets/stylesheets/ns_settings_ui/settings.css.scss?type=text/css&id=826fbc0028768702c2676b963d355eafe02c96a3a07900462883d845913e243f:ET
@@ -0,0 +1 @@
1
+ I"�/Users/marcin/Projects/U2i/ns_settings_ui/app/assets/stylesheets/ns_settings_ui/application.css?type=text/css&id=428672290e5980bebc8f7f68f04d4add526c10fa0747d4faa4b0eb424bbf4b3d:ET
@@ -0,0 +1 @@
1
+ I"�/Users/marcin/Projects/U2i/ns_settings_ui/app/assets/javascripts/ns_settings_ui/jquery.liveFilter.js?type=application/javascript&pipeline=self&id=eef4791ae004215254516dcc404d4d5fb29689a9c201e406cde9bc895f2f6ce3:ET
@@ -0,0 +1 @@
1
+ I"�/Users/marcin/Projects/U2i/ns_settings_ui/app/assets/stylesheets/ns_settings_ui/application.css?type=text/css&pipeline=self&id=913c4b5d9712f54b764abf3e256af27921196219fd0ef7f790a57a506a1f6abc:ET
@@ -0,0 +1,3 @@
1
+ [o:Set:
2
+ @hash{
3
+ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"wfile-digest:///Users/marcin/Projects/U2i/ns_settings_ui/app/assets/javascripts/ns_settings_ui/jquery.liveFilter.js;TT
@@ -1,2 +1,2 @@
1
1
  [o:Set:
2
- @hash} I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"8file-digest://app/assets/javascripts/application.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI")file-digest://app/assets/javascripts;TTF
2
+ @hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"8file-digest://app/assets/javascripts/application.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI")file-digest://app/assets/javascripts;TT
@@ -0,0 +1 @@
1
+ I"�/Users/marcin/Projects/U2i/ns_settings_ui/app/assets/javascripts/ns_settings_ui/application.js?type=application/javascript&id=757f4d0640c97dbf0e592bd2316204498e87297bdc5db38cc0bd49c036690c9a:ET
@@ -0,0 +1 @@
1
+ I"}app/assets/stylesheets/application.css?type=text/css&id=df04895b2ea4d333a4c1c6edcc21e49f05faa7b640809f6ba2c8e6b96e719e6e:ET
@@ -0,0 +1,3 @@
1
+ [o:Set:
2
+ @hash{
3
+ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=text/css&file_type=text/css&engines=.scss&pipeline=self;TTI"tfile-digest:///Users/marcin/Projects/U2i/ns_settings_ui/app/assets/stylesheets/ns_settings_ui/settings.css.scss;TT
@@ -0,0 +1 @@
1
+ I"�app/assets/stylesheets/application.css?type=text/css&pipeline=self&id=81d7eae3fa943494b91b1745c4499271cddf57d43bfe61b7cd77b103d231aa2f:ET
@@ -0,0 +1 @@
1
+ I"�/Users/marcin/Projects/U2i/ns_settings_ui/app/assets/javascripts/ns_settings_ui/application.js?type=application/javascript&pipeline=self&id=736f76545ced9231b28bb69647bbc41eb46ece648afe049cd94f7903927dcfb6:ET
@@ -1,2 +1,2 @@
1
1
  [o:Set:
2
- @hash} I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"8file-digest://app/assets/javascripts/application.js;TTI")file-digest://app/assets/javascripts;TTF
2
+ @hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"8file-digest://app/assets/javascripts/application.js;TTI")file-digest://app/assets/javascripts;TT
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash{I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"0processors:type=text/css&file_type=text/css;TTI"rfile-digest:///Users/marcin/Projects/U2i/ns_settings_ui/app/assets/stylesheets/ns_settings_ui/application.css;TTI"Lprocessors:type=text/css&file_type=text/css&engines=.scss&pipeline=self;TTI"tfile-digest:///Users/marcin/Projects/U2i/ns_settings_ui/app/assets/stylesheets/ns_settings_ui/settings.css.scss;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI"bfile-digest:///Users/marcin/Projects/U2i/ns_settings_ui/app/assets/stylesheets/ns_settings_ui;TT
@@ -0,0 +1 @@
1
+ I"�/Users/marcin/Projects/U2i/ns_settings_ui/app/assets/stylesheets/ns_settings_ui/settings.css.scss?type=text/css&pipeline=self&id=09e3da26e51598aab28942d6946b823bab3f7bc4d1c0762ac2c806a8f37774b8:ET
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI">processors:type=text/css&file_type=text/css&engines=.scss;TTI"tfile-digest:///Users/marcin/Projects/U2i/ns_settings_ui/app/assets/stylesheets/ns_settings_ui/settings.css.scss;TTI"Lprocessors:type=text/css&file_type=text/css&engines=.scss&pipeline=self;TT
@@ -0,0 +1 @@
1
+ I"�/Users/marcin/Projects/U2i/ns_settings_ui/app/assets/stylesheets/ns_settings_ui/settings.css.scss?type=text/css&pipeline=debug&id=d55c5ef2681fb76b78afe3acbbe455e4e4aa1ebbd1680f1f423aa59b8657fe80:ET
@@ -1,2 +1,2 @@
1
1
  [o:Set:
2
- @hash} I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI"9file-digest://app/assets/stylesheets/application.css;TTI")file-digest://app/assets/stylesheets;TTF
2
+ @hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI"9file-digest://app/assets/stylesheets/application.css;TTI")file-digest://app/assets/stylesheets;TT
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI"rfile-digest:///Users/marcin/Projects/U2i/ns_settings_ui/app/assets/stylesheets/ns_settings_ui/application.css;TTI"bfile-digest:///Users/marcin/Projects/U2i/ns_settings_ui/app/assets/stylesheets/ns_settings_ui;TTI"tfile-digest:///Users/marcin/Projects/U2i/ns_settings_ui/app/assets/stylesheets/ns_settings_ui/settings.css.scss;TT
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"qfile-digest:///Users/marcin/Projects/U2i/ns_settings_ui/app/assets/javascripts/ns_settings_ui/application.js;TTI"bfile-digest:///Users/marcin/Projects/U2i/ns_settings_ui/app/assets/javascripts/ns_settings_ui;TTI"wfile-digest:///Users/marcin/Projects/U2i/ns_settings_ui/app/assets/javascripts/ns_settings_ui/jquery.liveFilter.js;TT
@@ -0,0 +1 @@
1
+ I"�app/assets/javascripts/application.js?type=application/javascript&pipeline=self&id=c73b5fd92660a9d3f834c2d0de10201014c11ffcaebc04647cd3b8690ea902de:ET
@@ -1,2 +1,2 @@
1
1
  [o:Set:
2
- @hash} I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"0processors:type=text/css&file_type=text/css;TTI"9file-digest://app/assets/stylesheets/application.css;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI")file-digest://app/assets/stylesheets;TTF
2
+ @hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"0processors:type=text/css&file_type=text/css;TTI"9file-digest://app/assets/stylesheets/application.css;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI")file-digest://app/assets/stylesheets;TT
@@ -0,0 +1 @@
1
+ I"�/Users/marcin/Projects/U2i/ns_settings_ui/app/assets/javascripts/ns_settings_ui/application.js?type=application/javascript&pipeline=debug&id=2e2cabf70cc130af1b32c45c19516b1512b6a9e4ede1b234def05a41b081a348:ET
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Mprocessors:type=text/css&file_type=text/css&engines=.scss&pipeline=debug;TTI"tfile-digest:///Users/marcin/Projects/U2i/ns_settings_ui/app/assets/stylesheets/ns_settings_ui/settings.css.scss;TTI"Lprocessors:type=text/css&file_type=text/css&engines=.scss&pipeline=self;TT
@@ -0,0 +1 @@
1
+ I"�app/assets/javascripts/application.js?type=application/javascript&id=6420978826417918fbab00583b9645275cb8be4dfff9334936b51b573fd8bf91:ET
@@ -53,62 +53,150 @@ RSpec.describe NsSettingsUi::Setting, type: :model do
53
53
  let(:key) { 'aa.bb' }
54
54
  subject { described_class.make(key: key, value: value, value_type: value_type).formatted_value }
55
55
 
56
- context 'when value_type is default' do
57
- let(:value_type) { nil }
58
- context 'when value is a nil' do
59
- let(:value) { nil }
60
- it { is_expected.to be_nil }
61
- end
56
+ shared_examples 'string' do
62
57
  context 'when value is a string' do
63
58
  let(:value) { 'abcd' }
64
59
  it { is_expected.to eq('abcd') }
65
60
  end
61
+
66
62
  context 'when value is an integer with a string' do
67
63
  let(:value) { '4abcd' }
68
64
  it { is_expected.to eq('4abcd') }
69
65
  end
66
+
70
67
  context 'when value is an integer' do
71
68
  let(:value) { '10' }
72
69
  it { is_expected.to eq('10') }
73
70
  end
74
71
  end
75
- context 'when value_type is :string' do
76
- let(:value_type) { NsSettingsUi::Setting::TYPES[:string] }
72
+
73
+ shared_examples 'integer' do
74
+ context 'when value is a string' do
75
+ let(:value) { 'abcd' }
76
+ it { is_expected.to eq(0) }
77
+ end
78
+
79
+ context 'when value is an integer with a string' do
80
+ let(:value) { '4abcd' }
81
+ it { is_expected.to eq(4) }
82
+ end
83
+
84
+ context 'when value is an integer' do
85
+ let(:value) { '10' }
86
+ it { is_expected.to eq(10) }
87
+ end
88
+ end
89
+
90
+ shared_examples 'boolean' do
91
+ context 'when value is true' do
92
+ let(:value) { 'true' }
93
+ it { is_expected.to eq(true) }
94
+ end
95
+
96
+ context 'when value is false' do
97
+ let(:value) { 'false' }
98
+ it { is_expected.to eq(false) }
99
+ end
100
+
101
+ context 'when value is other than true or 1 or false' do
102
+ let(:value) { 'other' }
103
+ it { is_expected.to eq(false) }
104
+ end
105
+ end
106
+
107
+ shared_examples 'nullable_type' do
77
108
  context 'when value is a nil' do
78
109
  let(:value) { nil }
79
110
  it { is_expected.to eq(nil) }
80
111
  end
112
+
113
+ context 'when value is a empty string' do
114
+ let(:value) { '' }
115
+ it { is_expected.to eq(nil) }
116
+ end
117
+ end
118
+
119
+ context 'when value_type is default' do
120
+ let(:value_type) { nil }
121
+
122
+ context 'when value is a nil' do
123
+ let(:value) { nil }
124
+ it { is_expected.to be_nil }
125
+ end
126
+
81
127
  context 'when value is a string' do
82
128
  let(:value) { 'abcd' }
83
129
  it { is_expected.to eq('abcd') }
84
130
  end
131
+
85
132
  context 'when value is an integer with a string' do
86
133
  let(:value) { '4abcd' }
87
134
  it { is_expected.to eq('4abcd') }
88
135
  end
136
+
89
137
  context 'when value is an integer' do
90
138
  let(:value) { '10' }
91
139
  it { is_expected.to eq('10') }
92
140
  end
141
+
142
+ context 'when value is a boolean' do
143
+ let(:value) { 'true' }
144
+ it { is_expected.to eq('true') }
145
+ end
146
+ end
147
+
148
+ context 'when value_type is :string' do
149
+ let(:value_type) { NsSettingsUi::Setting::TYPES[:string] }
150
+
151
+ context 'when value is a nil' do
152
+ let(:value) { nil }
153
+ it { is_expected.to eq('') }
154
+ end
155
+
156
+ it_behaves_like 'string'
93
157
  end
158
+
159
+ context 'when value_type is :nullable_string' do
160
+ let(:value_type) { NsSettingsUi::Setting::TYPES[:nullable_string] }
161
+
162
+ it_behaves_like 'string'
163
+ it_behaves_like 'nullable_type'
164
+ end
165
+
94
166
  context 'when value_type is :integer' do
95
167
  let(:value_type) { NsSettingsUi::Setting::TYPES[:integer] }
168
+
96
169
  context 'when value is a nil' do
97
170
  let(:value) { nil }
98
- it { is_expected.to eq(nil) }
99
- end
100
- context 'when value is a string' do
101
- let(:value) { 'abcd' }
102
171
  it { is_expected.to eq(0) }
103
172
  end
104
- context 'when value is an integer with a string' do
105
- let(:value) { '4abcd' }
106
- it { is_expected.to eq(4) }
107
- end
108
- context 'when value is an integer' do
109
- let(:value) { '10' }
110
- it { is_expected.to eq(10) }
173
+
174
+ it_behaves_like 'integer'
175
+ end
176
+
177
+ context 'when value_type is :nullable_integer' do
178
+ let(:value_type) { NsSettingsUi::Setting::TYPES[:nullable_integer] }
179
+
180
+ it_behaves_like 'integer'
181
+ it_behaves_like 'nullable_type'
182
+ end
183
+
184
+ context 'when value_type is :boolean' do
185
+ let(:value_type) { NsSettingsUi::Setting::TYPES[:boolean] }
186
+
187
+ context 'when value is a nil' do
188
+ let(:value) { nil }
189
+ it { is_expected.to eq(false) }
111
190
  end
191
+
192
+ it_behaves_like 'boolean'
193
+ end
194
+
195
+ context 'when value_type is :nullable_boolean' do
196
+ let(:value_type) { NsSettingsUi::Setting::TYPES[:nullable_boolean] }
197
+
198
+ it_behaves_like 'boolean'
199
+ it_behaves_like 'nullable_type'
112
200
  end
113
201
  end
114
202
  end